WScript.exe and CScript.exe Options

For the most part, options listed in the following table are applicable to both WScript.exe and CScript.exe. Exceptions are noted.

Parameter

Description

/B

Batch mode; suppresses command-line display of user prompts and script errors. Default is Interactive mode.

/D

Turns on the debugger.

/E:engine

Executes the script with the specified script engine.

/H:CScript or /H:WScript

Registers CScript.exe or WScript.exe as the default application for running scripts. If neither is specified, WScript.exe is assumed as the default.

/I

Default. Interactive mode; allows display of user prompts and script errors Opposite of Batch mode.

/Job:<JobID>

Runs the specified JobID from the .wsf file.

/logo

Default. Displays a banner. Opposite of nologo.

/nologo

Prevents display of an execution banner at run time. Default is logo.

/S

Saves the current command-line options for this user.

/T:nn

Enables time-out: the maximum number of seconds the script can run. The default is no limit. The /T parameter prevents excessive execution of scripts by setting a timer. When execution time exceeds the specified value, CScript interrupts the script engine using the IActiveScript::InterruptThread method and terminates the process.

/U

Used with Windows NT and Windows 2000 to force the command line output to be in Unicode. There is no way for CScript to determine whether to output in Unicode or ANSI; it defaults to ANSI.

/X

Launches the program in the debugger.

/?

Displays a brief description of and usage information for command parameters (the usage information).

Community Additions

Show: