lapoigne Posted August 14, 2014 Posted August 14, 2014 Hello everyone, I run an autoit script where I need to save and restore a key in registry. This key is on HKEY_CURRENT_USER, so no need of admin right for the acces. I execute this line: RunWait('regedit.exe /s /e "' & @ScriptDir & '\portable-data\localbackup.reg" "HKEY_CURRENT_USER\SOFTWARE\thekey" ') When I run the script with a Guest account or a normal user, all work fine. But when the user is an admin and UAC is activated, I got an error Error: Unable to execute the external program. L'opération demandé nécessite une élévation. It's because when you run regedit whis admin account the UAC popup, as you can edit other key such HKEY_LOCAL_MACHINE If I run the script with admin privilege, it's work fine. I can't use #RequireAdmin, as normal user don't need this permision. Can I use regedit with admin user without uac ? Can I use #RequireAdmin only if user is an admin (isAdmin() doesn't work if UAC not passed)? Is there another solution with RegRead() with a loop on all subkeys to save in a file ? Thanks
JohnOne Posted August 14, 2014 Posted August 14, 2014 You could alter the registry using RegWrite() You would probably need to parse the .reg file first. Don't know how to do that, as I'm not familiar with them. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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