How do you use environment variables, such as %CommonProgramFiles%, in the PATH and have them recognized by services.exe?

Posted by Brad Knowles on Server Fault See other posts from Server Fault or by Brad Knowles
Published on 2010-06-09T23:13:29Z Indexed on 2012/12/16 5:07 UTC
Read the original article Hit count: 394

I'm trying to add C:\Program Files\Common Files\xxx\xxx to the system PATH environment variable by appending %CommonProgramFiles%\xxx\xxx to the existing path.

After rebooting, I open a command prompt and check the PATH. It expands correctly. However, when using Process Explorer from Sysinternals to view the Environment variables on services.exe, it shows the unexpanded version. Coincidentally, the paths using %SystemRoot% expand and are recognized just fine.

I've tried altering the PATH through the Environment Variables window from System Properties and through direct Registry manipulation, neither seems to work.

Is it possible to use other environment variables, besides %SystemRoot% in PATH and have services.exe understand it?

© Server Fault or respective owner

Related posts about Windows

Related posts about environment-variables