Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does VBScript have the equivalent to App.Path?

Status
Not open for further replies.

jonas37377

Programmer
Jun 27, 2003
2
US
Well does it?

I know ASP with IIS you can do it, but how about a pure *.vbs maintenance script? I'm needing a "hard" reference to the scripts directory for the log file. The script will be used on serveral different boxes, and its location will change so I don't want to hard code it in the script.

Thanks in advance,
Tim
 
I presume you are referring to a VBS hosted in WSH.

lcScriptPath = WScript.ScriptFullName
lcScriptName = WScript.ScriptName
MsgBox Mid(lcScriptPath, 1, Len(lcScriptPath) - Len(lcScriptName)-1) Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top