Change Environment Variable w/o reboot
Hi all,
I was trying to add an environment to the System PATH. I used the following script I found in the NSIS archive, where $R0 has the path I want to add. I am using a Windows XP machine.
ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" "$R0;$1"
However, this doesn't take effect until I reboot the system. I need to acheive the same effect as when you go to "System Properties" (Right click "My Computer" and select "Properties") and in the "Advanced" tab, click "Environment Variables" and edit the PATH in the System variables. This doesn't require reboot. Is there any command that I can use?
Help greatly appreciated!
Kimmy