"csript.exe/wscript.exe" Command Version and Options

This section describes how to start 'cscript' or 'wscript' command and what options are available.

If you want to find out if WSH is available or not on your Windows system, you can run "cscript /?" in a command window:

C:\herong>cscript /?

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Usage: CScript scriptname.extension [option...] [arguments...]

 //B         Batch mode: Suppresses script errors and prompts from 
 //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 WSF 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

The output tells me that I have WSH 5.6 installed on my Windows XP system.

The "wscript" command has same command line options.

Table of Contents

 About This Book

 Introduction of VBScript - Visual Basic Scripting Edition

 Variant Data Type, Subtypes, and Literals

 Arithmetic Operations

 Numeric Comparison Operations and Logical Operations

 String Operations - Concatenation and Comparison

 Variable Declaration and Assignment Statement

 Expression and Order of Operation Precedence

 Statement Syntax and Statement Types

 Array Data Type and Related Statements

 Array References and Array Assignment Statements

 Conditional Statements - "If ... Then" and "Select Case"

 Loop Statements - "For", "While", and "Do"

 "Function" and "Sub" Procedures

 Built-in Functions

 Inspecting Variables Received in Procedures

 Error Handling Flag and the "Err" Object

 Regular Expression Pattern Match and Replacement

 scrrun.dll - Scripting Runtime DLL Library

 Creating Your Own Classes

 IE Web Browser Supporting VBScript

 IIS ASP Server Supporting VBScript

WSH (Windows Script Host)

 What is WSH (Windows Script Host)?

"csript.exe/wscript.exe" Command Version and Options

 Running VBScript Code Files

 "WScript" Runtime Object Hierarchy

 "oShell.Exec(cmd)" - Running System Command with a Script

 WSF - Windows Script File XML Format


 PDF Printing Version