When do I need to do a restart for my server to use a variables new value, or no restart necessary? Is it OS version dependent?
Asked
Active
Viewed 5,852 times
2 Answers
5
When environmental variables change, any process that starts after that change is in place will have the change. Running processes won't get the new change until after they're restarted.

sysadmin1138
- 133,124
- 18
- 176
- 300
0
You could broadcast WM_SETTINGCHANGE message without restarting the processes. More info here: https://web.archive.org/web/20091124062536/http://support.microsoft.com/kb/104011
Check out powershell script which helps: https://www.powershellgallery.com/packages/PSCI/1.0.4/Content/core%5Cutils%5CUpdate-EnvironmentVariables.ps1

Krzysztof Gapski
- 171
- 1
- 2