vbscript printing to command line
December 26, 2007 11:55 AM Subscribe
How does one make a VBScript print to the command line without invoking Cscript before the script.vbs?
posted by adipocere to Computers & Internet (9 answers total)
Typically, one prints in VBscript using a Wscript.echo("Hello, world!") line or some variant thereof. If you do not invoke with a
cscript hello-world.vbs, you get a GUI/pop-up MsgBox, which I wish to avoid. I just want something to go right to the command line for output, without putting
cscript at the beginning.
Wscript.StdOut.WriteLine dies, of course, if not also invoked with a Cscript.
I do not want to permanently set my default scripting host to Cscript, either. This isn't "my" environment, so I wish to tread lightly.