Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a service which is installed that runs and executes certain commands periodically. It runs as the Local System account. The source code for the service is not under my control, but I do control the Windows XP SP3 box that the service is on.

Recently, changes were made to the system that put a certain path at the forefront of the %PATH% for this service. One of the executables in that path has the same name as one of the commands my service uses, so the service mistakenly uses the wrong executable.

I need to change things back so that my service executes the right command. How do I modify the %PATH% so that the service will see it? I've already tried setx -m ... but with no luck.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The offending directory is specified either in the system-wide PATH environment variable, or in the Local System user's personal environment variables.

The Local System user's personal environment variables are specified at "HKEY_USERS.DEFAULT\Environment". The machine-wide environment variables are specified at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment". The former isn't really easily accessible from anywhere except the registry, but the latter is accessible from the "Environment Variables" dialog on the "Advanced" tab of the "System Properties".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.