Where the reference count of a component of msi installer stored?

installation, windows-installer, wix

Solution

I've got some info about reference count of components from http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Windows-Installer-Service-and-reference-counting-td702967.html

Components are referenced, but not really reference counted. Instead, Windows Installer remembers each product which installed a component and where it installed it to. The actual format is undocumented and should not be relied upon; however, if you want to look at it, they’re in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\\Components. is the user’s security identifier, for per-user installs; for per-machine installs, it’s the well-known SID S-1-5-18 (which is Local System).

Problem

For a shared component of more than 2 products, Windows Installer stores reference count of that shared component so that uninstalling one of those products doesn't break other products. I'd like to know how this can be done, where the reference count of a shared component is stored. How can I reset broken reference count?

Original source