When I run my build process on Windows Server 2008, it fails with the error message like
Cannot run program \"foo\": CreateProcess: error=2, The syste
I had a similar requirement to customize Path variable on a Windows slave with a Windows Jenkins master. I did not want to create a Jenkins global environment variable and wanted this variable to be specific to a particular windows node/agent.
Here is what I did:
1) Created an Environment Variable as shown below in Nodes -> WindowsNode -> Configure screen:
2) Disconnected my Jenkins node.
3) Restarted my Jenkins system process directly on the slave.
4) Tested it out by clicking on Nodes -> WindowsNode -> System Information and saw the new environment variable assigned to the node:
5) Then used it in a Jenkins job that would run on the Windows slave/agent by adding below command to an Execute Windows Batch Command build step:
git --version