This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Click the task that you want to perform.
To start a script so that it runs in a Windows environment
To start a script so that it runs in a command-line environment
Open Command Prompt.
Type:wscript[ScriptName] [//B] [//D] [//E:Engine] [//H:CScript |//H:WScript] [//I] [//Job:Identifier] [//Logo |//NoLogo] [//S] [//T:Number] [//X] [//?] [ScriptArguments]
Performing this task does not require you to have administrative credentials. Therefore, as a security best practice, consider performing this task as a user without administrative credentials.
To open a command prompt, clickStart, point toAll programs, point toAccessories, and then clickCommand prompt.
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, Wscript.exe displays theWindows Script Host Settings dialog box, which you can use to set global scripting properties for all scripts that Wscript.exe runs on the local computer.
The//T parameter prevents excessive running of scripts by setting a timer. When the time exceeds the specified value, WScript interrupts the script engine and ends the process.
Windows script files usually have one of the following file name extensions: .wsf, .vbs, .js.
If you double-click a script file with an extension that has no association, theOpen With dialog box appears. Select Wscript or Cscript, and then selectAlways use this program to open this file type. This registers Wscript.exe or Cscript as the default script host for files of this file type.
You can set properties for individual scripts. See Related Topics for more information.
Windows Script Host can use .wsf script files. Each .wsf file can use multiple scripting engines and perform multiple jobs.
Open Command Prompt.
Type:cscript[ScriptName] [//B] [//D] [//E:Engine] [//H:CScript |//H:WScript] [//I] [//Job:Identifier] [//Logo |//NoLogo] [//S] [//T:Number] [//X] [//U] [//?] [ScriptArguments]
Performing this task does not require you to have administrative credentials. Therefore, as a security best practice, consider performing this task as a user without administrative credentials.
To open a command prompt, clickStart, point toAll programs, point toAccessories, and then clickCommand prompt.
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//T parameter prevents excessive running of scripts by setting a timer. When the run time exceeds the specified value, CScript interrupts the script engine and ends the process.
Windows script files usually have one of the following file name extensions: .wsf, .vbs, .js.
You can set properties for individual scripts. See Related Topics for more information.
Windows Script Host can use .wsf script files. Each .wsf file can use multiple scripting engines and perform multiple jobs.
If you double-click a script file with an extension that has no association, theOpen With dialog box appears. Select Wscript or Cscript, and then selectAlways use this program to open this file type. This registers Wscript.exe or Cscript as the default script host for files of this file type.
You can set properties for individual scripts. See Related Topics for more information.
Windows Script Host can use .wsf script files. Each .wsf file can use multiple scripting engines and perform multiple jobs.
| Format | Meaning |
|---|---|
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
| Code or program output |