PDA

View Full Version : Does change in PATH Environement variable need system RESTART???



anil_boddu
09-02-2003, 01:35 AM
Hi all,
I am preparing installation file for the product using Install Shield 6.3 and it needs some directories to be there in PATH system environment variable, we are modifying the PATH variable by appending required directories to the following registry entry

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path".

But without restart , those changes are not reflecting in my product. Does the change in Environment SYSTEM PATH variable need the system Restart??

One more important thing is if i open system properties and checked the system PATH variable , the added entires exist there. If i press APPLY or OK then my product able to detect those directories otherwise if press CANCEL the changes are not effective.

Please give me some inputs.

Thanks N Regards
Anil

nasagar
09-05-2003, 04:14 PM
Changes to the system environment variable does need a reboot.

Sagar

BlakeMillerWW
09-09-2003, 09:38 AM
If you broadcast a windows message with the window message settings changed (WM_SETTINGCHANGE), you might not need to reboot. I forget what the parameters are supposed to be.

Also call the library function to set the environment variables:

BOOL SetEnvironmentVariable(
LPCTSTR lpName, // environment variable name
LPCTSTR lpValue // new value for variable
);