开发者

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,"\"))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜