You can run scripts with the command-line-based script host by typing the following at the command prompt:
cscript [script name] [host options] [script arguments]
Where:
• | script name is the name of the script file, including the file name extension and any necessary path information. |
• | host options are the command-line switches that enable or disable various Windows Script Host features. Host options are always preceded by two slashes (//). |
• | script arguments are the command-line switches that are passed to the script. Script arguments are always preceded by one slash (/). |
Note
• | Each parameter is optional; however, you cannot specify script arguments without specifying a script. If you do not specify a script or any script arguments, Cscript.exe displays the Cscript.exe syntax and the valid host options. | ||||||||||||||||||||||||||
• | The command-line-based script host supports the following host options:
|
||||||||||||||||||||||||||
• | The time out option (//T:nnnnn) prevents excessive execution of scripts by setting a time limit. When execution time exceeds the specified value, Cscript.exe interrupts the script engine and stops the process. | ||||||||||||||||||||||||||
• | You can also use Windows Script Host to create .wsf script files, with which you can call multiple scripting engines and perform multiple jobs, all from one file. |