Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Updating Microsoft Windows (win32) environment variablesby BrowserUk (Patriarch) |
on Jul 13, 2003 at 20:54 UTC ( [id://273823]=note: print w/replies, xml ) | Need Help?? |
You only need to (re-) start the processes that you need to see the new System Environment vars, after changes are made through the ControlPanel->System->environmentTab or directly through the registry. For example. If you have a CMD window open, it won't see changes made whilst it is open, but if you open a new one (via the Start menu short cut!) it will. However, if you start a new window from an existing one using START, then that new session will inherit its environment from the existing window and so will not see any changes made through the control panel or the registry since the original window was opened. That is, unless you use the /I switch on the START command, in which case it will get a fresh copy complete with changes. The same is true for any other applications running when the change is made. They will not see those changes as their copy of the environment was created when they were. Whether any child processes they spawn will see changes will depend upon what flags the app uses when is calls CreateProcess. Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
In Section
Seekers of Perl Wisdom
|
|