Property:  WScript.Path

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.

The following VBScript code illustrates the use of this property.

Code:
WScript.Echo "Path to WSH =", WScript.Path

Output:
Path to WSH = C:\WINNT\system32

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information