I created a new freestyle job that I configured to lock a resource by label and execute a windows batch.
I get following error:
[lockable-resources] acquired lock on [MSbuild_Robotic]
[EnvInject] - Loading node environment variables.
Building remotely on windowsslave (ctc codesonar windows) in workspace e:\jenkins\workspace\work_testjob
[work_testjob] $ cmd /c call C:\Users\SAFETY~1\AppData\Local\Temp\hudson8046177881644065079.bat
The parameter is incorrect
FATAL: command execution failed
java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
This does not happen if I configure it to lock the resource by name instead of label.
Maybe it is noteable that in this case I configured the resource in the way that it's name is identical to it's label.