Sign in to follow this  
Followers 0
ant2ne

autoit not executing as the logged on user

3 posts in this topic

Basically, I'm writing an autoit exe that runs as a service. As such, since it is executed as "System" I think the program thinks that the logged on user is "System". I need to execute some things on the logged on users @appdata and registry, but the program tries to execute this stuff on "System's" @appdata and registry. Any advice on how to make these things run as the logged on user? Or make it execute on the logged in user?

Please, do not reply asking my why I'm running this as a service or any other such nonsense that is not an answer to my question.

Share this post


Link to post
Share on other sites



Running it as a service really prohibits it from doing certain things. To check if it really is executing as system you can look in task manager or add MsgBox(0,"AppData Path",@Appdata) to your code near the beginning. As for running as the user you could run a launcher a service and use RunAs() to run your actual script if need be.

Share this post


Link to post
Share on other sites

Running it as a service really prohibits it from doing certain things. To check if it really is executing as system you can look in task manager or add MsgBox(0,"AppData Path",@Appdata) to your code near the beginning. As for running as the user you could run a launcher a service and use RunAs() to run your actual script if need be.

if I do a RunAs() wouldn't I then need the user's name and password? I want this to run on whatever user is logged in.

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