. . that I'd ever posted anything in General Q&A. Anyway, here it is:

Access Denied to Registry Key This includes the dreaded error 0x90070005 which particularly comes up when uninstalling AVG Antivirus (Note: backslashes replaced by virtical line due to IWeThey display).
  1. Log in as Administrator
  2. Download or copy the Microsoft command line program subinacl.msi and run it to install. Tell it to install in C:|subinacl.msi to reduce typing.
  3. Open Command window and change Directory: cd |subinacl
  4. In this step, substitute the registry key you are having problems with. The one shown here is the one usually giving problems with AVG.
    1. subinacl /keyreg "HKEY_LOCAL_MACHINE|SOFTWARE|Microsoft|Windows NT|CurrentVersion|Windows" /owner=Administrator
    2. subinacl /keyreg "HKEY_LOCAL_MACHINE|SOFTWARE|Microsoft|Windows NT|CurrentVersion|Windows" /grant=Administrator=f
    3. subinacl /keyreg "HKEY_LOCAL_MACHINE|SOFTWARE|Microsoft|Windows NT|CurrentVersion|Windows" /grant=SYSTEM=f
  5. You should now be able to open the key. Check advanced permissions and you will probably find one or more entries that say Deny Everyone. Delete these.
  6. Now set up the exact permissions you need, if different from what's there automatically.
Solution by William Crawford.