Microsoft KB Archive/245254

= Setting the Default Scripting Engine =

Article ID: 245254

Article Last Modified on 3/1/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server

-



This article was previously published under Q245254



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

Keywords: kbenv kbinfo KB245254

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.