WSH » WScript » Path

Syntax:
WScript.Path

The Path property is read only and returns the full path to the directory containing the host executable file (wscript or cscript).

There is no final "\" at the end of the returned string.

Examples

Code:
WScript.Echo "Path to WSH =", WScript.Path
Output:
Path to WSH = C:\WINNT\system32
Explanation:

This VBScript code illustrates the use of this property.

Language(s): VBScript

See Also: