Thanks to Alex K. Angelopoulos for helping me to get started on Windows Script Host and VBScript.
To run a VBScript, we'll usually just run CSCRIPT scriptfilename.vbs
or WSCRIPT scriptfilename.vbs
, optionally followed by some arguments for the script itself.
If your script contains lots of WScript.Echo
statements, use CSCRIPT
, since WSCRIPT
will popup a message dialog for each WScript.Echo
.
The following syntax is for CSCRIPT
.
The WSCRIPT
syntax is identical, except it has no //U
switch.
Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. 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 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
page last modified: 2016-09-19; loaded in 0.0025 seconds