Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this can be done?

I'd rather do this via some sort of command that can be put at the end of a .BAT file, and don't want to use any tools other than those that come with the OS in a fresh install. This needs to be minimally compatible with Windows XP SP3, and should work all the way up to Windows 7 x64 and Server 2008 R2.

share|improve this question
2  
superuser.com/questions/312906/… - You need to write/install a program that sends WM_SETTINGCHANGE message. –  Zoredache Feb 16 '12 at 21:40
    
@Zoredache So, that's not something that can simply be done from the command prompt? Bummer. –  Iszi Feb 16 '12 at 21:43
    
It is possible to shut down explorer , stuff in a change, and restart the explorer via CMD tools in XP. I used Kill /f, warned the user, put in a pause, then killed it. In 7 i think the command is taskkill. I have not tried that trick in 7. –  Psycogeek Feb 17 '12 at 4:46

1 Answer 1

If you are trying to use the new value of the path variable from within a Windows command shell, all you should need to do is close your command shell window and open a new one. The new command shell will load the updated path variable.

So I think the answer to your original question sort of depends on where exactly you are trying to see the change take effect... Is there something specific that is not working for you?

share|improve this answer
    
I'll have to test this. I'd tried opening a new command shell, but hadn't closed the first yet I think. –  Iszi Feb 17 '12 at 0:48
    
Also, which variable are you changing - the system path or the user path? I am nearly certain that the behavior will be different for each (they get refreshed based on different triggers). –  Shannon Wagner Feb 17 '12 at 11:12
1  
The variable is in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment –  Iszi Feb 17 '12 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.