Sign in to follow this  
Followers 0
smjmh

edit registry under user profile without adim priv.

6 posts in this topic

I need to edit several registry settings (i.e. - perform several RegWrite, RegDelete) in a script, but I don't want to have to logoff the user account (which doesn't have reg edit permission) and login as admin. Is their a way to do this?

My thought is to use RunAsSet to set as domain admin then use Run wait to call another .exe which contains the reg cmd's. Is this the best way to do this?

Share this post


Link to post
Share on other sites



Yup! RunAsSet() will work perfect for this.

Share this post


Link to post
Share on other sites

Yup! RunAsSet() will work perfect for this.

Only when you shell another script or let the script restart itself with Admin rights to the PC... (many times posted so just search for it)

Thing to remember is that possibly another user reg hive is loaded when running with different credentials.

:whistle:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Only when you shell another script or let the script restart itself with Admin rights to the PC... (many times posted so just search for it)

Thing to remember is that possibly another user reg hive is loaded when running with different credentials.

:whistle:

All my changes will be under HKLM, so would it still matter which user reg hive is loaded?

Share this post


Link to post
Share on other sites

If it's just for HKLM, no problem, it works, I use that at my office.

Share this post


Link to post
Share on other sites

Thank you for the quick help....i appreciate it!

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