How to change cscript.exe to wscript.exe execution for all VBScript files?

i need help picture i need help · Sep 23, 2009 · Viewed 32k times · Source

After installing the new server, I am facing an issue.

I have lot of .vbs files, all need to run in wscript, reason, I use all those command like WScript.Echo "hello"

I want to be able to see the output when I double click the VBScript file.

But when I right click on the vbs file, I see console, I want to change the default to Windows host, globally!

How can I do that?

Answer

Fredrik Mörk picture Fredrik Mörk · Sep 23, 2009

You can change the default scripting host to wscript.exe like so:

wscript.exe //H:wscript

If you wish to set cscript as the default host, that works in the same way:

wscript.exe //H:cscript

You can execute cscript.exe with the same arguments for the same result.