Home NT WSH
WScript properties

The following code demonstrates the various WScript object's properties and methods

On error Resume Next

' Output the version of Microsoft Windows Script Host.
ScriptVer = WScript.Version
WScript.Echo ScriptVer

' Output the fully-qualified path-name of the host.
WScript.Echo (WScript.Fullname)

' Output the name of the host.
WScript.Echo (WScript.Name)

' Output the name of the directory containing the WScript object. WScript.Echo WScript.Path
' Output the file name of the currently running script. ScriptShort = WScript.ScriptName WScript.Echo ScriptShort ' Output the full path-name of the currently running script. ScriptFull = WScript.ScriptFullName WScript.Echo ScriptFull ' Echo the script mode. WScript.Echo (WScript.Interactive)

79 percent of all Macintosh computers shipped are still in use. - Apple Corp.




Back to the Top

Simon Sheppard
SS64.com