I'd guess you need to escape the spaces in the original string? I dunno - I
don't have a Windows environment handy to test on.

A.

On Wed, Apr 18, 2018 at 6:28 AM, David Aldrich <[email protected]>
wrote:

> 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/1780c53558db4c81b98ca30e74c2d4
> 0a%40EUX13SRV2.EU.NEC.COM
> <https://groups.google.com/d/msgid/jenkinsci-users/1780c53558db4c81b98ca30e74c2d40a%40EUX13SRV2.EU.NEC.COM?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPbPdOY_r3oGaNMaa9SRYFsSg4QNSPOfWyvA66LLXsQXGZUogA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to