Setting the Default Scripting Engine

Article translations Article translations
Article ID: 245254 - View products that this article applies to.
This article was previously published under Q245254
Expand all | Collapse all

SUMMARY

Depending on the scripts you are running, you may want to change the default script engine from WScript to CScript so that it is not necessary to type "cscript" before each file (or vice-versa). This article describes how to change the default script engine.

MORE INFORMATION

The default scripting engine for Windows 2000 is WScript. To change the default scripting engine from WScript to CScript, type the following line:
cscript //h:cscript //s
For additional information about the cscript command, type cscript /? at a command prompt. This displays the following information:
Microsoft (R) Windows Script Host Version 5.1 for Windows
Copyright (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
				
For information about the wscript command, type wscript /? at a command prompt. This displays the following information:
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
				

Properties

Article ID: 245254 - Last Review: March 1, 2007 - Revision: 3.2
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Datacenter Server
Keywords: 
kbenv kbinfo KB245254

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com