JNoir Posted May 27, 2007 Share Posted May 27, 2007 Hi there, i´m totally new to AutoIT and at the moment playing around with this great scripting language I´m just not sure how to solve the following: I´m writing a App which should only be run from a usb stick, a user should not be able to copy the app to the c: or d: drive. When he does this, he should get an error message. My problem is, i´m not sure how to find out, from where my script is running. Any ideas? Thanks in advance for your help Link to comment Share on other sites More sharing options...
Seoke Posted May 27, 2007 Share Posted May 27, 2007 Instead of making the paths to the .ini files and such relative make it a full pathline. You can use DriveGetDrive("Removable") to return an array of all removable data types then you can take those and instead of putting say FileOpen("emailInfo.text") you can put it so it's a full filepath using said array I'm kinda new to this to so its teh best I could think of... Link to comment Share on other sites More sharing options...
JNoir Posted May 27, 2007 Author Share Posted May 27, 2007 (edited) Hi, Seoke, thanks for the fast reply, but i actually don´t understand everything you mentioned. When i use DriveGetDrive( "Removable" ) i get an array of the removable drives, clear so far. But i´m still not sure how to find out the full path from which the script is executed or how opening a file should help me? And what exactly do you mean with "putting"? I hope the questions aren´t too dumb Thanks again. Edited May 27, 2007 by JNoir Link to comment Share on other sites More sharing options...
Developers Jos Posted May 27, 2007 Developers Share Posted May 27, 2007 @ScriptDir ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JNoir Posted May 27, 2007 Author Share Posted May 27, 2007 How could i have overseen that Macro Thanks 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