Will a Local System service notice changes to environment variables in Windows 2008 R2 without a reboot?

Restarting a service will pickup changes to system environment variables.

To check: Use SysInternals Process Explorer to inspect the environment of a service process before and after changing/adding a System environment variable and restarting the service. Note: Use "Run as administrator" on procexp.exe to see all properties of system processes.

enter image description here

enter image description here


Sure. Any process sees the environment variables AS THEY ARE WHEN THE PROCESS STARTS. It basically gets a copy.

So, if you need them to be picked up by services - restart the services. If you need them to be picked up by windows, restart windows.

Especially because the local system account is keeping this copy around ;) So - no. This still holds true. I would generally say that changing this is a "near zero priority" item as this kind of change is quite rare.


@Brian answer does not cover all use cases. In my case, I've upgraded Java on Windows 7 x64 machine from version 7 to 8. After that, the service which depends on Java failed to start ("net start SymmetricDS") because the system could not find Java executable.

I.e. services.exe (parent process of all LocalSystem services) does not pick up environment variables' changes itself. It just does so for new spawned child processes. I've confirmed it by looking at it with SysInternals Process Explorer. Proof: http://workblog.pilin.name/2013/03/service-environment-variables.html. It doesn't say which versions of Windows does it apply to, but the date of publication is rather new, so I think it applies to Windows 7 and Windows Server 2008.

Solved the problem by making symlinks to Java executables in one of folders in old PATH contained in services.exe.