Sign in to follow this  
Followers 0
Rick

"unable to open the script file" error when #RequireAdmin

3 posts in this topic

#1 ·  Posted (edited)

Hi , have a small query, if the script is set to #RequireAdmin and the user account then runs as the user account and not admin then an Autoit error pops up with "unable to open the script file".

Is there a way to stop this error message should #RequireAdmin fail, maybe say something like requires admin credentials or something?

I'm using v.3.2.13.11

Thanks

Edited by Rick

Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi.

Hi , have a small query, if the script is set to #RequireAdmin and the user account then runs as the user account and not admin then an Autoit error pops up with "unable to open the script file".

Is there a way to stop this error message should #RequireAdmin fail, maybe say something like requires admin credentials or something?

use IsAdmin() and exit, if the user isn't admin equiv.

I'm using v.3.2.13.11

The latest version is 3.3.0.0

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Hi.

use IsAdmin() and exit, if the user isn't admin equiv.

Regards, Rudi.

Yes thats fine, providing i dont use #RequireAdmin in the script which is what i'd prefer to do, the Autoit error occurs because it cant open the script, so all i was suggesting was the error be less an error of the program than the conditions its being run in if that makes sense!?


Who needs puzzles when we have AutoIt!!

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