开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜