20

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

What's the difference between these two options?

Pacerier
  • 86,231
  • 106
  • 366
  • 634

2 Answers2

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"
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
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

MD5
  • 1,356
  • 15
  • 14