0
test.vbs:
wscript.quit MsgBox ("Hello"&vbNewLine&"World",0)
works.
prova.bat:
WScript //Nologo Message.vbs "Hello"&vbNewLine&"World" 0
Message.vbs:
wscript.quit MsgBox (wscript.arguments(0),wscript.arguments(1))
not works (Why?).
prova.bat (without newline)
WScript //Nologo Message.vbs "Hello World" 0
works.
The command line being passed end up being:
– HelpingHand – 2017-08-24T19:16:47.057WScript //Nologo Message.vbs "Hello"
due to the " This can be seen in Process Explorer - http://imgur.com/a/7I7MA1Great! You were able to post. But what exactly is your question? – LPChip – 2017-08-24T19:37:19.300
What do you want to happen? Do you want a space in the first argument to be replaced with a newline? – davidmneedham – 2017-08-24T19:50:20.030
1Any ampersands (&) must be escaped with a caret (^&). I also suggest using
Replace(wscript.arguments(0), "\n", vbNewLine)
in your VBScript and changing your .bat file to something likeWScript //Nologo Message.vbs "Hello\nWorld" 0
– davidmneedham – 2017-08-24T20:12:24.893