cheetsheet VBscript

Cheatsheat for VBscripts

Comment # This is a comment in a VBscript file
print Wscript.Echo "Hello World!"
Arguments call the script like c:\cscript yourscript.vbs arg1 arg2 arg3

Dim ArgObj
Set ArgObj = WScript.Arguments

Wscript.Echo ArgObj.Item( 0)
Wscript.Echo ArgObj.Item( 1)
Wscript.Echo ArgObj.Item( 2)

if IF (condition) Then
# Do stuff
ELSE
# Do other stuff
END IF
FOR for i = 1 to 5
# Do stuff
NEXT
Exit WScript.Quit(0)