JSI Tip 2825. How do I change the default script host from Wscript to Cscript or visa versa?

Jerold Schulman

September 11, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today


We discussed the Windows Scripting Host (WSH) in tip 2531.

The default scripting engine for Windows 2000 is Wscript. If you use Cscript more often, you may wish to change the default, to eliminate the need to type Cscript before each file.

To change the default, type:

cscript //h:cscript //s

Typing cscript /? generates:

Microsoft (R) Windows Script Host Version 5.1 for WindowsCopyright (C) Microsoft Corporation 1996-1999. All rights reserved.Usage: CScript scriptname.extension [option...] [arguments...]Options: //B         Batch mode: Suppresses script errors and prompts from             displaying //D         Enable Active Debugging //E:engine  Use engine for executing script //H:CScript Changes the default script host to CScript.exe //H:WScript Changes the default script host to WScript.exe (default) //I         Interactive mode (default, opposite of //B) //Job:xxxx  Execute a WS job //Logo      Display logo (default) //Nologo    Prevent logo display: No banner will be shown at              execution time //S         Save current command line options for this user //T:nn      Time out in seconds:  Maximum time a script is permitted              to run //X         Execute script in debugger //U         Use Unicode for redirected I/O from the console

Typing wscript /? generates:

Usage: WScript scriptname.extension [option...][arguments...]Options: //B           Batch mode: Suppresses script errors and prompts               from displaying //D           Enable Active Debugging //E:engine    Use engine for executing script //H:Cscript   Changes the Default script host to CScript.exe //H:Wscript   Changes the default script host to WScript.exe //I           Interactive mode(default, opposite of //B) //Job:xxx     Execute a WS job //Logo        Display logo(default) //Nologo      Prevent logo display: No banner will be shown               at execution time //S           Save current command line options for the user //T:nn        Time out in seconds: Maximum time a script is                permitted to run //X           Execute script in debugger




Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like