Forum Discussion
rraghvani
Champion Level 3
4 days agoEither of these three options will work,
function launch()
{
let path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
let option = "-inprivate";
let command = `"${path}" ${option}`;
Log.Message(`Command is '${command}'`);
WshShell.Run(command);
getActiveXObject("WScript.Shell").Run(command);
Sys.OleObject("WScript.Shell").Run(command);
}
Note, the Run method has no parameters. You also need to ensure your Edge is configured correctly, as it can run in the background.