Start an application with JScript
Is there a way to start an application using JScri开发者_高级运维pt?
You can use something like:
WSH = new ActiveXObject("WScript.Shell");
WSH.run("notepad.exe");
To launch an executable from Windows Scripting Host using JScript, create a file with the .js
extension and add this code:
var shell = WScript.CreateObject("WScript.Shell");
shell.Run("calc.exe");
Double click the file's icon to execute and launch the application.
精彩评论