I\'m trying to get the current directory and use it to run an application no matter where the file is put and no matter how the path is changed
Dim fso: set
Use With in the code.
Try this way :
''''Way 1 currentdir=Left(WScript.ScriptFullName,InStrRev(WScript.ScriptFullName,"\")) ''''Way 2 With CreateObject("WScript.Shell") CurrentPath=.CurrentDirectory End With ''''Way 3 With WSH CD=Replace(.ScriptFullName,.ScriptName,"") End With