Cscript Command In Windows Server 2008

In this article I am going to explain about Cscript command in Windows Server 2008 operating system and also explain it's related syntax.
  • 2662


Cscript command is available in all version of Windows. Cscript command provides command-line options for setting script properties. It starts a script so that it runs in a command-line environment. Cscript.exe is command line based script host.

Cscript command syntax

Cscript <Scriptname.extension> [/B] [/D] [/E:<Engine>] [{/H:CScript|/H:WScript}] [/I] [/Job:<Identifier>] [{/Logo|/NoLogo}] [/S] 
[/T:<Seconds>] [/X] [/U] [/?] [<ScriptArguments …>]

In above syntax

Parameter Description
Scriptname.extension Assigns the path and file name of the script file.
/B Assigns batch mode, which does not display alerts, scripting errors.
/D Starts the debugging.
E:<Engine> It specifies the engine used for executing script.
H:CScript Changes the Cscript.exe as the default script host to for running scripts.
H:WScript Changes the WScript.exe as the default script for running scripts (default).
/I Changes mode to be interactive mode which displays alerts, scripting errors and input prompts.
/Job:<Identifier> Execute WSF job.
/Logo Specifies that the Windows Script Host banner is displayed in the console before the script runs.
/Nologo Prevent Logo display.
/S It saves the current console options for current user.
/T:<Seconds> Specifies the maximum time, the script is permitted to run.
/U Use unicode for input and output that is redirected from command prompt.
/X Execute script in debugger.

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.