Running Jenkins in Windows with regular user account

Running Jenkins in Windows with regular user account to see executables in PATH

Went through a very irritating « feature » of Jenkins in Windows, the fact that it runs as the default system user.
From there you have to options:
– Change the system user to have the dependencies you need, or
– Use a regular account

I went with the later.

The symptom is that commands executed in the Build – Execute Windows batch command step will not be able to find executables, despite the fact that they are defined in %PATH%.

A good way to diagnose is to check that you really have the %PATH% properly set and identify who’s running the command. Use these two lines:

echo %PATH%
echo %USERDOMAIN%\%USERNAME%

To solve set the properties in the Jenkins service to use the user you wan and that should marry things just nicely. There are drawbacks in using user accounts like that but it’s much easier and have the expected behaviour.

Edit (aitek.ch): there are drawbacks doing this, like the fact that sometimes the service will give you a login failure, and you will have to go an set the password for the user again, then start the service again, but it works.

Source : Software Antagonistic Pleiotropy: Running Jenkins in Windows with regular user account to see executables in PATH