Forum Discussion
AlexeyKolosov
Staff
14 years agoHi Saurabh,
You can use the Run and Exec methods of the WScript.Shell object.
The following code demonstrates how to launch Notepad using the Run method:
var path;
path = '"C:\\Windows\\Notepad.exe"';
WS = new ActiveXObject("WScript.shell");
WS.Run(path);
Log.Message("Notepad is running");
I hope this helps.
You can use the Run and Exec methods of the WScript.Shell object.
The following code demonstrates how to launch Notepad using the Run method:
function RunNotepad()
{
var path;
path = '"C:\\Windows\\Notepad.exe"';
WS = new ActiveXObject("WScript.shell");
WS.Run(path);
Log.Message("Notepad is running");
}
I hope this helps.