How to resolve “Unable to open Sub key” Error when installing an MSI package?
There are several occasions when you might get a “Unable to open sub key” or “Error 1402.Could not open key:” or “Error 1402.Could not open key: UNKNOWN\Components\XXXXXXXXXXXXXXXXXXXXXXXX” etc. Most of these errors are because you have already installed this product and un-installation or upgrade of the product did not complete properly. Hence there are some registry keys left with bad ACL’s in the registry.
The work around I mention here is for OS’s Windows XP Sp2 and above. Meaning, you are seeing this problem either in Windows XP or Windows Vista or Windows 7.
Open “RegEdit” and browse to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
- Right Click on Components select permissions
- Click Advanced
- Select the “Owner” Tab
- Select Administrators (Group) as owner and Click Apply.
- Then Select Checkbox that says “Replace owner on sub containers and objects” and Click apply.
- Browse back to the Permissions tab, select the Check box that says “Replace all child objects with inheritable permissions from this object” and Click apply
You should see couple of Warnings similar to below image, but those are fine. Its just complaining about some restricted windows components.
Hope this helps some one