Is there anyway to get the path of a VBScript (.vbs) while it is running?
I have a script.vbs that can be anywhere on a clients PC and it needs to create a directory relative to its location. Is there a way开发者_StackOverflow for the executing .vbs to know where it is running?
Found it.
WScript.ScriptFullName
strScriptPath = Left(WScript.ScriptFullName,InStrRev(WScript.ScriptFullName,"\"))
精彩评论