CSCRIPT.EXE uses the following syntax:
cscript [host options…] [script name] [script options]
Each parameter is optional; however, you cannot specify script parameters without specifying a script. If you don't specify parameters, CSCRIPT.EXE displays the CSCRIPT.EXE syntax and the valid host parameters.
CSCRIPT.EXE supports the following host parameters:
Parameter |
Description |
//R |
Reregister the well known script extensions (.VBS, .JS, .TCL, ) by searching for well known registered script engines. |
//I |
Interactive Mode (Default - Opposite of //B) |
//B |
Batch Mode. Suppress ALL non-command line console UI requested from script. |
//T:nn |
Time out in seconds. Maximum time the script can run (Default = No limit). This option is used to prevent excessive execution of scripts; it does this by setting a watchdog timer. When execution time exceeds the specified value, CSCRIPT interrupts the script engine using the IActiveScript::InterruptThread method and terminates the process. NOTE There is a callback hook here. In the event that that the time-out is invoked, the "OnTimeOut( )" subroutine will be called to permit some cleanup. While it is possible to create infinite loops using this feature, it is more useful that harmful. |
//logo |
Display an execution banner at exec time (Default - Opposite of //NoLogo). |
//nologo |
Prevent Display of execution banner at exec time>. |
//C |
Make CSCRIPT.EXE the default application for running scripts. |
//S |
Save current command line options for this user (per user). |
//? |
Show command usage (same as execution with no parameters). |