how do you include an external script using javascript in windows script host cscript.exe
views:
44answers:
1
A:
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
harper
2010-07-22 09:14:06
thanks this is really helpful
Dave Taylor
2010-07-23 05:22:00