Sign in to follow this  
Followers 0
JNoir

Determine the path, from where my script is launched

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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...

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by JNoir

Share this post


Link to post
Share on other sites

How could i have overseen that Macro :)

Thanks :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0