WSCRIPT and CSCRIPT Commands: Syntax, Parameters, Examples




WSCRIPT is the Windows-based version of Windows Script Host while CSCRIPT is the command-prompt-based version. This guide takes a detailed look at both versions – including Syntax and Parameters and examples.

WSCRIPT Command Line Syntax


The syntax of WSCRIPT is shown below:

WSCRIPT [<scriptname>] [/B] [/D] [/E:] [{/H:CSCRIPT |/H:WSCRIPT }] [/I] [/job:<WSF-Job>] [{/logo|/nologo}] [/S] [/t:<number>] [/X] [/?] [<Script Arguments>]

The next section explains the meaning of each parameter in the syntax.


WSCRIPT Parameters Explained

The table below explains the parameters shown in the WSCRIPT Syntax.

1<scriptname>Specifies the full path and name of the script
2/B*Runs the script in batch mode.
3/DStarts the debugger.
4/E**Allows you to specify the engine to use in executing the script
5/H:CSCRIPT Registers CSCRIPT to run scripts by default.
6/H:WSCRIPT***Changes the default script host to WSCRIPT
7/IRuns the script in interactive mode (default). This is the opposite of /b parameter.
8/job:<WSF-Job>Runs the specified WSF job
9/logoDisplays logo
10/nologoSpecifies not to display the Windows script file logo
11/SSaves the current command prompt options for the logged in user
12/t:<number>****Specifies how long the script is allowed to run before it is timed out. By default the script will run indefinitely.
13 /XStarts the script in the debugger.
14 /?Displays WSCRIPT help
*Batch mode stops WSCRIPT from displaying alerts, scripting errors, or input prompts.
**Using the /e switch allows you to execute a script with custom file extensions. Without specifying the /e parameter, if you double-click a file with an unknown file extension you will receive an error message.
***By default Windows will run scripts with WSCRIPT
****You can specify up to 32,767 seconds.

WSCRIPT Examples

In this section I will show you some examples and applicable use of WSCRIPT.

To get Windows to execute scripts with CSCRIPT by default, run this command:

WSCRIPT Examples - change default windows script file to CSCRIPT

To run a VBScript, WSCRIPT-Test.abs (with a custom file extension), type the command below. Then press Enter.

WSCRIPT C:\Scripts\WSCRIPT-Test.abs /e:VBScript 



The syntax of CSCRIPT is shown below

CSCRIPT <Scriptname.extension> [/B] [/D] [/E:] [{/H:cscript|/H:wscript}] [/I] [/Job:] [{/Logo|/NoLogo}] [/S] [/T:] [/X] [/U] [/?] [<ScriptArguments>]

CSCRIPT Parameters

The parameters of the CSCRIPT command are exactly the same as those of the WSCRIPT commands, with the exception of /U parameter. Click WSCRIPT Parameters Explained for the parameters.

The /U parameter of CSCRIPT specifies to use Unicode for redirected I/O from the console

CSCRIPT Examples

To execute a VBScript and display a banner, execute the command below:

CSCRIPT C:\Scripts\CSCRIPT-Test /logo 

To specify a timeout for the script, run the command below:

CSCRIPT C:\Scripts\CSCRIPT-Test /T:1200
In the previous command the script will terminate after 20 minutes (1200 seconds)


I hope this guide has been helpful. If you have any question or comment, use the “Leave a Reply” form at the end of the page. Alternatively, you could share your experience so other readers can benefit from it.

Other Helpful Guides

Additional Resources and References


Please enter your comment!
Please enter your name here


network discovery keeps turning off server 2016

How to Fix Network Discovery If it Keeps Turning Off in Server 2016

Does network discovery keep turning off in your Windows server 2016? It is likely that one of its dependent services is not...
how to install windows 10 1903 update manually

How to Install Windows 10 1903 Update Manually

Windows 10 1903 Update was released in May, 2019. But some users are not yet offered the update via automatic update. The...
spotify web player not working

Spotify Web Player Not Working [Fixed]

Introduction Spotify Web Player may stop working for you with the following error messages: "Spotify Web Player an Error...
DISM.exe /Online /Cleanup-Image /Restorehealth

DISM.exe /Online /Cleanup-Image /Restorehealth Explained

What is DISM.EXE /Online /Cleanup-image /RestoreHealth? "DISM.exe /Online /Cleanup-Image /Restorehealth" is a DISM command that repairs issue with the...
DHCP Relay agent

DHCP Relay Agent: Configuration in Windows Server 2016

What is a DHCP Relay Agent? A DHCP Relay Agent allows DHCP clients in a different network subnet to...


Remote Desktop Connection

Remote Desktop Connection an Internal Error Has Occurred [Fixed]

Introduction I recently received the error message "Remote Desktop Connection an Internal Error Has Occurred". It was strange because...

Find My Samsung: Register and Use Samsung Find my Mobile

Introduction Ever wondered how you could find your Samsung phone if you lost it? Find my Samsung or Samsung...
What is the Difference Between PowerShell and CMD?

Windows Powershell vs CMD: Differences and Similarities

Introduction This short guide compares Windows PowerShell vs CMD (Windows command prompt). I will cover the history and nature...
Spotify No Longer Supports this Version of Microsoft Edge

Spotify No Longer Supports this Version of Microsoft Edge [Fixed]

Introduction When you open Spotify web player on Microsoft Edge, you may receive the error message "Spotify No Longer...
Windows 10 Won't Boot

Windows 10 Won’t Boot With Black Screen? 3 Ways to Fix It

Why Won't Windows 10 Boot Up? If your Windows 10 stops with a black screen, the first question in...


bullet points in excel

4 Easy Ways to Insert Bullet points in Excel

Introduction Inserting bullet points in excel is not as straightforward as adding bullet points in Word. This guide demonstrates...
Walmart Baby Registry

Walmart Baby Registry: Your Definitive Guide

Introduction Walmart Baby Registry gives expectant mothers a place to create a list of items they need for their...
powershell get ad group members

PowerShell Script to Get Active Directory Group Members

Introduction This guide is a hands-on step by step showing how to write a Powershell script to Get AD...
spotify no longer supports this version of chrome

How to Fix “Spotify no Longer Supports this Version of Chrome”

Introduction Have you been frustrated by "Spotify no Longer Supports this Version of Chrome" error? You are not alone!...
Dynamic disks bs basic disks

Dynamic Disk vs Basic Disk: How to Convert to Dynamic Disk

Introduction Dynamic disk type was introduced by Microsoft with Windows 2000. Earlier versions of Windows Operating Systems used Basic...


disable cortana windows 10 featured

How to Disable Cortana in Windows 10 (2 Methods)

Introduction Some Windows 10 users may not like Cortana. Solution? Disable Cortana. You are probably reading this because you...
bootrec /fixboot access is denied

How to Fix BootRec /FixBoot Access is Denied Error in Windows 10

Introduction BootRec /FixBoot Access is Denied Error in Windows 10? This error is likely caused by corrupt EFI directory.
Reset Windows 10

How to Reset Windows 10 (2 Methods)

Introduction If your Windows 10 is broken, one available way to fix it is to use Windows 10 reset....
system restore windows 10

How to Enable and Use System Restore in Windows 10

Introduction System restore in windows 10 is a very important tool that is probably ignored by most users. But...
windows has stopped this device code 43

How to Fix Windows Has Stopped this Device Code 43 Error

Introduction Sometimes you may receive "Windows has stopped this device code 43" error. This error is likely to come...
Windows could not automatically detect this network's proxy settings

How to Fix “Windows Could not Automatically Detect this Network’s Proxy Settings”

Introduction You suddenly lose the ability to connect to the internet. Then you run network troubleshooter and it returns...
printer offline

5 Ways to Restore Your Printer Online If Status is Offline

Introduction Is your printer offline? Setting it online is very simple but sometimes it is more than just setting...

How to Fix “BootMgr is Missing” Error in Windows 10

Introduction If you receive Fix "BootMgr is missing" Error in Windows 10, the default response is panic! But you...
windows 10 search featured

How to Fix Windows 10 Search If it Stops Working

Introduction Are you having troubles with Windows 10 search? Apparently, it is a fairly common problem with a number...
oooops, something went wrong. reload

How to Fix “Oooops something went wrong. reload” Spotify Error

Introduction If you receive "Oooops something went wrong. reload" Spotify error, do not panic. The fix is simpler than...



RAID 50 vs RAID 10: Benefits and Disadvantages Compared

What is RAID 50 vs RAID 10? RAID 50 stripes two RAID 5 arrays while RAID 10 stripes two...
Reset Windows 10

How to Reset Windows 10 (2 Methods)

Introduction If your Windows 10 is broken, one available way to fix it is to use Windows 10 reset....
Websites Like Craigslist for Cars - featured

Top 5 Websites Like Craigslist for Cars

Craigslist is a local classified Ads website with 7 sections including cars. It is a brilliant site but using other websites like...
How to get help in Windows 10

How to Get Help in Windows 10 in 5 Easy Ways

Introduction This "How to Get Help in Windows 10" guide discusses 5 easy ways you can find help while...
concatenate excel

Concatenate in Excel: How to Concatenate Columns and Strings

What is Concatenate in Excel? Concatenate in Excel is joining two strings into one continuous string. You can join...

By using this website you agree to accept our Privacy Policy and Terms & Conditions