开发者

Is there anyway to get the path of a VBScript (.vbs) while it is running?

开发者 https://www.devze.com 2022-12-16 23:10 出处:网络
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 runni

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

精彩评论

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