Hi, in case someone finds this post like I did when experiencing the same 
problem, here is my solution.

The problem comes from java web start that adds the path to the JRE in the 
environment that starts all jobs. It writes it as:

PATH="all_path_variables;"C:\Program Files (x86)\Java\jre1.8.0_45\bin""

Please note the extra quotes surrounding the last path. When the visual studio 
environment is set up by nmake, calling "vcvars64.bat", the batch script chokes 
on the first quote thinking it ends the variable, and then calls other programs 
: "(x86) \Java\jre1.8.0_45\bin" and falls on its sword. This is due to the 
"set" command being called from within an "if" statement in "vcvars64.bat"

My workaround is the following:
In your jenkins script, if you write a batch script (poor you, I know how much 
you are suffering), then before calling your build, replace the quotes in your 
path:

REM remove double quotes from the PATH variable, or nvcc calling vcvars64.bat 
chokes on them.
set PATH=%PATH:"=%

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f6aa3e99-1314-42d1-ba77-ce4b9d36ecfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to