cscript - VBScript


cscript is a command-line utility that executes scripts written in VBScript. It’s used for automating tasks, customizing system behavior, and developing script-based utilities.


cscript [options] [[//x] scriptfile.vbs] [arguments]


  • //nologo: Suppresses the copyright banner.
  • //b: Runs the script in batch mode, suppressing interactive popups.
  • //e::: Sets echo settings for commands: on, off, stdout, or stderr.
  • //h:CScript.exe: Displays command syntax and options.
  • //s: Runs the script in silent mode, suppressing all output.
  • //u:: Specifies the user ID under which the script will run.
  • //w:: Sets the working directory for the script.
  • //x: Enables file extension probing for script execution.


Execute a script:

cscript simple.vbs

Run a script in batch mode without popups:

cscript //b script.vbs

Execute a script with echo set to stderr:

cscript //e:stderr:on script.vbs

Common Issues

  • Script not found: Ensure the script file path is correct and the script exists.
  • Syntax errors: Check the script for syntax issues and correct any errors.
  • Permission denied: Make sure the script has the necessary permissions to execute.


cscript can be combined with other commands in batch files or PowerShell scripts:

echo hello world | cscript //nologo