Compartir a través de


Windows Script Host overview

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Windows Script Host overview

You can use Windows Script Host to run scripts by clicking a script file on the Windows desktop or by typing the name of a script file at the command prompt. Similar to Microsoft Internet Explorer, Windows Script Host serves as a controller of ActiveX scripting engines. Unlike Internet Explorer, Windows Script Host has very low memory requirements and is ideal for both interactive and non-interactive scripting, such as logon scripting and administrative scripting.

There are two versions of the Windows Script Host: a Windows-based version (Wscript.exe), which provides a property sheet for setting script properties, and a command-prompt-based version (Cscript.exe), which provides command-line switches for setting script properties. You can run either of these by typing Wscript.exe or Cscript.exe at the command prompt.

Previously, the only native scripting language supported by the Windows operating system was that of batch files. Although batch language is fast and small, its features are limited compared to VBScript and JScript. For example, the ability to control program flow was not built into the batch language. Today, the Windows Script Host architecture allows you to take advantage of these powerful scripting languages, although support is still provided for batch files.

This version of WSH adds several areas of new functionality: