David K
David K

Reputation: 11

Jenkins as Windows Service - Running Windows batch command <some program> is not recognized

So I have this Jenkins as windows service setup on my local machine. I have made Jenkins service to run as my user not SYSTEM following advice from this post: enter link description here I have added the path to the programs to the environment variable from Manage Jenkins -> Configure System -> Global.. Environment Variables with name PATH and concatenated by ; between paths

e.g. C:\Path\To\Program1;C:\Path\To\Program2

One of them I added was python and it does recognize it. But all other programs which is called from the python code fails with error " is not recognized..." for example "p4 is not recognized..."

How do I solve this issue?

Upvotes: 0

Views: 204

Answers (1)

loris
loris

Reputation: 213

Instead of adding a PATH variable to Jenkins environment variable, try adding those directories to the system PATH environment variable (the one you can edit from Windows environment variables administration panel), then restart Jenkins and try again.

Upvotes: 2

Related Questions