Microsoft® Windows® Script Host
WScript Object
WSH Reference
Version 1

See Also                      Properties                      Methods


Description
Exposes properties that provide the path of the running scripting host (wscript.exe or cscript.exe), its arguments, and the working mode (interactive or batch). The WScript object also provides methods to create and read objects.
Example
The following example returns environment variable values using the Echo method:
Set WshShell = WScript.CreateObject( "WScript.Shell" )
WScript.Echo WshShell.Environment("Process").Item("WINDIR") 
WScript.Echo WshShell.Environment("Process").Item("PATH") 
WScript.Echo WshShell.Environment("Process").Item("PROMPT")
WScript.Echo WshShell.ExpandEnvironmentStrings("%WINDIR%")