Recently, I was developing a setup package whose uninstall actions were broken. During testing, I could install the package but wasn’t able to uninstall it. To remove the package and go on with development, I used the Windows Installer Cleanup Utility. So far, so good – I thought.
Next time I tried to install the package, I got the error “Error 1402. Could not open key: UNKNOWN\Components\[Big number]\[Big number]”. What happened? A look into the Registry Editor revealed two secrets:
- The specified key was underneath HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
- Apparently, the Cleanup Utility didn’t remove all the registry entries of my former setup very correctly. Instead, it left the mentioned key in the registry but removed or messed up my permissions:
What do? Right-click, then Permissions shows following screen:
Also, the key had no owner:
So the fix was clear: set the owner and add permissions:
And voila: you can access the key again!