There's any way to run vbscript directly to wscript or cscript command line

Vitim.us picture Vitim.us · Oct 29, 2012 · Viewed 9.7k times · Source

I want to run a vbs command from command line as I would in batch calling

cmd.exe /c "echo.Hello World! & pause"

Obviously this doesn't work

wscript /C MsgBox("Hello world")

I could print the vbs and then call the temporary file and then delete it

cmd.exe /c "echo. [VBSCODE] > temp.vbs & wscript temp.vbs & del temp.vbs"

but this is too messy, and I don't want the prompt poping up.

Answer

tinyfiledialogs picture tinyfiledialogs · Jan 26, 2015

This works directly on the command line:

mshta vbscript:Execute("MsgBox(""Message"",64,""Title"")(window.close)")