Windows Scripting Host

From the Microsoft Documentation:

"Microsoft® Windows® Script Host is a language-independent scripting host for ActiveX® scripting engines. It brings simple, powerful, and flexible scripting to the Windows 32-bit platform, allowing you to run scripts from both the Windows desktop and the command prompt.

Windows Script Host is ideal for non-interactive scripting needs such as logon scripting, administrative scripting, and machine automation."

In other words: It gives you useful objects to fiddle with, in various languages.

Just as ActiveServerPages introduce intrinsic global objects to the ScriptingEngine per request, so to does WSH. For example, the "WScript" object in WindowsScriptingHost is somewhat equivalent to the "Server" object in ActiveServerPages in that it provides a "CreateObject?" method to which a ProgId of a ComComponent may be passed for instantiation.

For example:

In addition, the more recent versions of WSH enable you to format your source script with XML that defines different blocks within the same script that can all be in different languages. For example you can define a string parsing algorithm in JavaScript which you can then call from VbScript or any other ScriptingLanguage for that matter.

--DrewMarsh


EditText of this page (last edited November 16, 2001) or FindPage with title or text search