Microsoft® Windows® Script Host
Running Scripts with WScript.exe
 WSH Tutorial
Previous
Next

 

WScript.exe is the version of Windows Script Host that enables you to run scripts from Windows. WScript.exe provides a Windows-based dialog box for setting script properties. Using WScript.exe, you can run scripts under Windows in the following ways: If you double-click a script file whose extension has not yet been associated with WScript.exe, an Open With dialog box appears, asking which program to use to open the file. Choose WScript and check Always use this program to open this file check box to register WScript as the default application for all files having the same extension as the one you double-clicked. For example, if you check this check box when you run Chart.vbs, WScript.exe becomes the default application for all files having the .vbs extension.

The WScript.exe properties dialog box provides the following options:

Property Description CSCRIPT equivalent
Stop script after specified number of seconds. Specifies the maximum number of seconds that a script can run. The default is no limit. //T:nn
Display logo when script is executed in command console. Displays a banner before running the script. This is the default. The opposite is //nologo. //logo  or
//nologo

Using the WScript.exe Properties dialog box, you can set global scripting options for all scripts that WScript runs on the local machine. You can also set options for individual scripts, using a .wsh file. For details, see Setting Script Properties.

When Windows Script Host ships with Windows NT® 2000, you will no longer need to provide the script file's extension. Instead, you can type the script name alone, or double-click the script in Windows Explorer.