smjmh Posted July 12, 2007 Share Posted July 12, 2007 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? Link to comment Share on other sites More sharing options...
dufran3 Posted July 12, 2007 Share Posted July 12, 2007 Yup! RunAsSet() will work perfect for this. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 12, 2007 Developers Share Posted July 12, 2007 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. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
smjmh Posted July 12, 2007 Author Share Posted July 12, 2007 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.All my changes will be under HKLM, so would it still matter which user reg hive is loaded? Link to comment Share on other sites More sharing options...
pixels75 Posted July 12, 2007 Share Posted July 12, 2007 If it's just for HKLM, no problem, it works, I use that at my office. Link to comment Share on other sites More sharing options...
smjmh Posted July 12, 2007 Author Share Posted July 12, 2007 Thank you for the quick help....i appreciate it! Link to comment Share on other sites More sharing options...
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