d

WSH - Hello World

Every language has a "hello world" program, so here it is.

You can run WSH scripts in two ways (WScript.exe and CScript.exe).

If you run this under cscript.exe, each WScript.Echo() call will send its output to the prompt that started it.

Under WScript, each WScript.Echo() call will generate a popup showing the text.

A word of caution: WScript.Echo is a loop can generate a lot of popups when run using WScript.exe. CScript.exe is must better for these as the screen will just scroll

// a must!
WScript.Echo("Hello World");  
   
// on two lines.
WScript.Echo("Hello\nWorld"); 

// using a variable.
var msg = "Hello World";
WScript.Echo( msg );       

// using a variable and a string
WScript.Echo( msg + "\nGoodbye World");

// Finish
WScript.Echo("Finished!");