hc_vinod
10 years agoOccasional Contributor
passing arguments as parameter to command prompt
Hi , I need to open a command prompt from my script and need to enter some comands , and these commands i need to pass as a parameter Something like : i need to open CMD prompt and enter pi...
- 10 years ago
Try
var cmd = "ping 127.0.0.1"; var oShell = Sys.OleObject("WScript.Shell"); var ret = oShell.run("cmd /C " + cmd, 1, true); Log.Message("ret = " + ret);
See Microsoft docs for more info: Run Method