My declarative script contains:

environment {
      VSMSBUILDCMD_14_0 = 'C:\\Program Files (x86)\\Microsoft Visual Studio 
14.0\\Common7\\Tools\\VsMSBuildCmd.bat'
    VSMSBUILDCMD_14_1 = 'C:\\Program Files (x86)\\Microsoft Visual 
Studio\\2017\\BuildTools\\Common7\\Tools\\VsMSBuildCmd.bat'
}

<snip>

steps {
    bat '''
        call "%VSMSBUILDCMD_14_1%"
        msbuild <snip>
    '''

This results in error:

c:\jenkins\workspace\MyJob>call "%C:\Program Files (x86)\Microsoft Visual 
Studio\2017\BuildTools\Common7\Tools\VsMSBuildCmd.bat%"
\Java\jre1.8.0_161\bin"" was unexpected at this time.

I think I need to escape  'Program Files (x86)'.  What is the correct syntax 
for this please?

Best regards

David

-- 
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/1780c53558db4c81b98ca30e74c2d40a%40EUX13SRV2.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

Reply via email to