VBScript Introduction

From WikiOD

Remarks[edit | edit source]

VBScript (VBS) is a Visual Basic-flavored scripting language for Internet Explorer and Windows. It can be used on the web in principle, like JavaScript, but does not have much support, so it's usually confined to standalone or server-side scripts in business environments that use Windows exclusively.

Versions[edit | edit source]

Version Release Date
1.0 1996-08-13
2.0 1996-12-14
3.0 1997-10-01
4.0 1998-06-01
5.0 1999-03-01
5.1 1999-12-01
5.5 2000-07-01
5.6 2001-08-27
5.7 2006-10-18
5.8 2009-03-19

Hello World message using cscript and wscript[edit | edit source]

WScript.Echo "Hello world!"

This displays a message on the console if run with cscript.exe (the console host) or in a message box if run with wscript.exe (the GUI host).

If you're using VBScript as the server-side scripting language for a web page (for classic ASP, for example),

Response.Write "Hello world!"

puts the message into the HTML send to the client (browser).

If you want to displays a message in the message box, you can use:

 Msgbox "Hello World!"