Running Scripts Using Wscript.Exe

Using Wscript.exe, you can run scripts under Windows in two ways:

When you run scripts from Wscript.exe, you can select the Always Use the Windows Scripting Host to open this file check box and set properties on the WSH Properties page.

When you select the Always Use the Windows Scripting Host to open this file check box, Wscript.exe is registered as the default application to run files with a given extension. For example, if you select this check box when you run Chart.vbs, Wscript.exe becomes the default application for all files with the .vbs extension. This check box functions the same as the Cscript.exe //C switch.

The WSH Properties page provides the options shown in the following table.


Property

Function
CSCRIPT equivalent
Stop script after nn seconds Specifies a maximum number of seconds that a script can run (the default is no limit). //T:nn
By default, run scripts in Interactive or Batch mode Suppresses or enables all user interface requests from the script other than those issued at the command line in a Command Prompt window. Interactive mode allows all user-interface requests, while Batch mode allows only command-line user-interface requests.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.