Home > Articles > Home & Office Computing > Microsoft Windows Desktop

  • Print
  • + Share This
This chapter is from the book

Using CScript for Command-Line Scripts

The Windows Script Host has a second host front-end application called CScript (CScript.exe), which enables you to run scripts from the command line. In its simplest form, you launch CScript and use the name of the script file (and its path, if required) as a parameter, as in this example:

cscript myscript.vbs

The Windows Script Host displays the following banner and then executes the script:

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

As with WScript, the CScript host has an extensive set of parameters you can specify:

CSCRIPT [filename] [arguments] [//B] [//D] [//E:engine] [//H:host] [//I]
ccc.gif[//Job:xxxx] [//S] [//T:ss] [//X] [//LOGO | //NOLOGO] [//U]

This syntax is almost identical to that of WScript, but it adds the following three parameters:


Displays the Windows Script Host banner at startup


Hides the Windows Script Host banner at startup


Uses Unicode for redirected input/output from the console

  • + Share This
  • 🔖 Save To Your Account