Thursday, September 29, 2011

Fix Windows Error While Installing : Cannot open registry key

Recently I was trying to install Windows Office 2010 by performing an upgrade over the existing Office 2007 it took too long and decided to stop the installation and manually uninstall 2007 then go for 2010 fresh installation. However when I tried to uninstall 2007 there was some issue and I was not able to remove it.

I tried manually deleting Office 2007 files and also removing all its temp and reference files in the disk. This worked fine but when I tried to install 2010. I got the following error:

setup cannot open the registry key Unknown/Component/xxxxxxxxxxxx make sure you have administrative rights..

That was annoying as I realized that the registry rights were screwed , little Google search told me that I have to get SubInACL [ Download ] However that meant I had to fix all the registries
So I found a cool script on addictive tips by Ghaus Iftikar Nakodari , So here is what you do :

Copy the SubInACL.exe from the place it installed to C:\Windows\system32

Now write the following in a notepad and save it as registryfix.cmd

subinacl /subkeyreg HKEY_LOCAL_MACHINE /setowner=administrators
subinacl /subkeyreg HKEY_CURRENT_USER /setowner=administrators
subinacl /subkeyreg HKEY_CLASSES_ROOT /setowner=administrators
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
 Right click on the file and run it as administrator, it should take a while before it fixes all the registry keys. Do not close or interrupt the process while it runs.

Ref :

1 comment:

  1. Nice blog its so informative click this link, and fix your problem.
    Fix Windows 7 Error 1068
    Thank you
    Aalia lyon