Duran Posted November 14, 2007 Share Posted November 14, 2007 I need help getting the Current directory that a script runs off of. Like mounting the drive so that the script can use it as its Home path or so. Its for a tool that will be running off a jump drive that will allow me to run scripts and executables from a user interface Autoit script. Or is it possible for me to just add in the paths like "scripts/test1/test1.exe" instead of adding in "C:" or something. Link to comment Share on other sites More sharing options...
Nahuel Posted November 14, 2007 Share Posted November 14, 2007 How about @ScriptDir Link to comment Share on other sites More sharing options...
Duran Posted November 14, 2007 Author Share Posted November 14, 2007 What would be a good example of using this? or is there a example on how to use it in the Help documents? Link to comment Share on other sites More sharing options...
Nahuel Posted November 14, 2007 Share Posted November 14, 2007 MsgBox(0,"","Your script is running from: " & @ScriptDir) @ScriptDir returns the path to the directory the script is running from. Let's say you're script is at C:\Scripts and you have a subdirectory with a program: C:\scripts\test1\test1.exe If you want to run test.exe: Run(@ScriptDir & "\test1\test1.exe") Link to comment Share on other sites More sharing options...
Duran Posted November 14, 2007 Author Share Posted November 14, 2007 Thanks a bunch ^^ I will post my Script later once its all done thanks again. ~Robert Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now