Scripting Home > WSH Reference Guide

WScript Object

Description

The WScript object exposes various properties about the running script and the WSH environment. It also provides methods to create and work with objects, along with several core WScript methods such as: Sleep, Echo and Quit.

Example

'WScript object used to create objects
set WshShell = WScript.CreateObject("WScript.Shell")

'WScript object used to echo information
WScript.Echo "Hello World!" 'VBScript
WScript.Echo("Hello World!") 'JScript

'WScript object used to terminate scripts
WScript.Quit