0

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?

user8160
  • 329
  • 5
  • 13

2 Answers2

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