ant2ne Posted October 24, 2008 Posted October 24, 2008 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.
dbzfanatic Posted October 24, 2008 Posted October 24, 2008 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. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
ant2ne Posted October 24, 2008 Author Posted October 24, 2008 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.
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