开发者

how do you include an external script using javascript in windows script host cscript.exe

开发者 https://www.devze.com 2023-01-08 07:04 出处:网络
how do you include an external script using javascript in wind开发者_StackOverflowows script host cscript.exeYou can provide a COM server, implemented in JScript. The typical file extension is WSC. Th

how do you include an external script using javascript in wind开发者_StackOverflowows script host cscript.exe


You can provide a COM server, implemented in JScript. The typical file extension is WSC. This server will be registered with scrobj.dll as surrogate.

The JScript can now instantiate this server with new ActiveXObject and call the methods exported by the server.

If youd don't need the externel script to be executed in the calling process, consider shell.Run("someScript.js") to just execute the other JScript code.

see: http://technet.microsoft.com/en-us/library/ee692823.aspx

0

精彩评论

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