Passing an argument which includes double quotes to wscript.echo
Posted on 2010-04-08
I regularly use a script to connect to various servers. The script is run in the following manner:
myscript.vbs <TYPE> <SERVERIPADDRESS> <USERNAME> <PASSWORD>
However when the password includes double quotes, they fail to display. This is the code I use to display the username and password:
wscript.echo "Username: " & args.item(2) & " Password: " & args.item(3)
Without changing the script, is there a way I can pass the double quotes? I've already tried double quote 1, 2 and 3 times, with a preceeding \ and using chr(34). And at best ended up with \ or chr(34) displaying in my popup.