Site hosted by Angelfire.com: Build your free website today!
Chapter 40: Automating Tasks with the Windows Script Host

PreviousChapterContentsGlossaryNext

Configuring the Cscript Program

You can use two kinds of command-line options with Cscript:

The command-line options you can use with Cscript are listed in Table 40-1.

Option Description
//? Displays information about the Cscript command.
//B Runs the script in batch mode, so that all user prompts and script errors are suppressed. This is the opposite of the //I option.
//H:name Registers the program name (which must be either Cscript or Wscript) as the application for running this type of script. The default program for running scripts is Wscript.
//I Runs the script in interactive mode, displaying all user prompts and script errors. (This is the default setting.) This is the opposite of the //B option.
//logo Displays a banner when the script starts. (This is the default setting.) This is the opposite of the //nologo option.
//nologo Does not display the WSH banner. This is the opposite of the //logo setting.
//S Saves the command-line options you use this time so that they become the default.
//T:nn Specifies the maximum number of seconds that the script can run before Cscript cancels the script.
Table 1: Cscript Command-Line Options

PreviousChapterContentsGlossaryNext