开发者

Start an application with JScript

开发者 https://www.devze.com 2023-03-07 05:00 出处:网络
Is there a way to start an application using JScri开发者_高级运维pt?You can use something like:

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

精彩评论

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