
When you run a Windows Scripting Host file such as a Visual Basic or Java script, Explorer WSCRIPT.EXE is executed and runs the script using the necessary script plug-in.
To run from the command line, use CSCRIPT.EXE which has a number of optional parameters.
Suppose you had the following hello.vbs file:
Wscript.Echo "Hello" Wscript.Quit 0
Wscript.Echo "Hello" Wscript.Quit 0
You would run with command
C:\> cscript hello.vbs
C:\> cscript hello.vbs
which would print Hello to the command window. Typing
C:\> wscript hello.vbs
would bring up Hello in a window.
C:\> wscript hello.vbs
would bring up Hello in a window.