in reply to Re: Setting and changing system variables under win2000
in thread Setting and changing system variables under win2000

I tried your code (as I have already written) and I found some strange things:
  • this code adds the keys to the registry
  • the variables can be seen in the "Variables d'environment" context menu
  • but if i type echo %The_variable_I_changed% i get just %The_variable_I_changed% and not the value
  • in %ENV there is no new key %The_variable_I_changed%

    strange, or?

    Anyone can help?

    ----
    NaSe
    :x

    • Comment on Re: Re: Setting and changing system variables under win2000
  • Replies are listed 'Best First'.
    Re: Re: Re: Setting and changing system variables under win2000
    by strat (Canon) on Aug 13, 2002 at 14:20 UTC
      Try to close the dos-prompt (or cmd.exe or whatever) and reopen it. If that still doesn't work, try to logoff and logon again (or just reboot).

      If the first solution fixes the problem, it might help to add the following line to the code above:

      $ENV{'The_variable_I_changed'} = 'value';
      This will temporarily add the environmentvariable, but will be gone if you close the shell. But if you reopen another, the system variable from the other code now will be accessible instead.

      Sorry, I can't test it because here I don't have access to a Windows-machine in the moment...

      Best regards,
      perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

        You are right after a relogin it works ... thanks so I will do both change the registry and change the %ENV-entry so that it works before and after reboot - thanks a lot

        ----
        NaSe
        :x