Hello all,

I'm new to JavaScript so bear with me. I am sending a command to windows CMD line which is working. However I want to change the username and password in the command to variables within my script. I can't seem to find any syntax anywhere that allows me to do so. Here's what I when it's hard-coded without variables:

Sys.OleObject("Wscript.Shell").Run('cmd /k(cd c:\\"Program Files (x86)\"\\TheFolder\\program client & program SETWORKINGFOLDER "$//Test Complete Scripts" "C:\\dave" -host 192.222.22.226 -user "Johndoe" -password "mypassword" -repository "RepoFolder" & program GET -host 192.168.254.226 -user "Johndoe" -password "mypassword" -repository "RepoFolder" "$//Test Complete Scripts" -merge overwrite -setfiletime current)');

for the variables I've tried this:

var userName = '"Johndoe"';
Sys.OleObject("Wscript.Shell").Run.................-user %userName

any help is appreciated! thanks!