Should we use CScript.exe or WScript.exe to run .vbs files? [duplicate]
Asked Answered
C

2

20

VBScript (.vbs) files can be run using either cscript.exe or wscript.exe.

What's the difference between these two options?

Caucasus answered 26/4, 2011 at 9:16 Comment(0)
D
26

One major difference is that cscript runs within a console, wscript does not.

If you want console-like output, use cscript. In that mode, printing will result in output to the console. That same printing in wscript send its output to dialog boxes:

wscript.echo "hello"
Delphinus answered 26/4, 2011 at 9:18 Comment(0)
C
3

With cscript, it displays the info in a cmd window, which will not stop the script. while using Hscript will get a info pop up which halts the script

Corked answered 7/4, 2015 at 7:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.