SprinklerHead
25th June 2003 15:52 UTC
Path Manipulation - Windows 2000
I am having a problem with the Path Manipulation function on a Windows 2000 machine. The installer runs successfully, but even after a reboot the path does not get added [System Properties --> Advanced Tab --> Environment Variables]. In this particular case the PATH variable doesn't exist at all. Any ideas as to why this might be happening? Thanks.
SprinklerHead
25th June 2003 16:50 UTC
OK, the user installed as an Admin, but then changed to a Power User. So the Path gets set for whoever you are when you install, but not for other users I guess.
So, if I change the path manip function so that it writes the path key to HKLM instead of HKCU, wouldn't that do the trick? Is there a reason not to do it that way?
Joost Verburg
25th June 2003 23:25 UTC
I think that should work. Try it :)
kichik
26th June 2003 11:34 UTC
Almost. It should be HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment".
bigfooot
2nd July 2003 15:19 UTC
Originally posted by kichik
Almost. It should be HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment".
works great
SprinklerHead
9th July 2003 16:07 UTC
A few more questions about this.
Which Sendmessage should I use given that I am going to right to HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"?
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "STR:Environment" /TIMEOUT=5000
What is the difference between WM_WININICHANGE and WM_SETTINGCHANGE?
kichik
10th July 2003 13:30 UTC
WM_SETTINGCHANGE is the exact same thing as WM_WININICHANGE. It's even defined this way in MSVC's header files:
#define WM_SETTINGCHANGE WM_WININICHANGE