DigDeep

Startup with Admin

6 posts in this topic

Hi,

I have a program that should run at startup and does lots of functions to download, install, check for entries. 90% of the actions require Admin rights. But if I put #RequireAdmin then the code gets added to registry and startup, but does not run in Process. If I remove #RequireAdmin then it runs, but where it is required for admin rights those actions do not work.

I even tried to create 2 files. 1st one to hold all the Functions with Admin rights and 2nd one to get Startup part which will call the 1st part. But it does the same.

 

Any suggestions, how can I run the code in Startup and get Admin rights?

Share this post


Link to post
Share on other sites



@jguinch

I tried adding the Scheduled task UDF. But that didn't make any difference. My code still runs at startup Actions could not be performed as the functions need Admin rights.

Is there anyways, I can run Startup file with Admin rights?

Share this post


Link to post
Share on other sites

I was adding the code in HKCU to get it Startup. I found that adding in HKCU does not allows Admin Rights. I changed the registry path to HKLM and now it is working correctly with Admin Rights and no issues.

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