cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
op_kesare
Level 3

Uninstall: registry entry not get removed.

I have common ISM template. I have created 3 MSI using same ISM template but with different ProductName and ProductVersion and ComponentName. The component files are dynamic. The registry key path contains the ComponentName in the path (which is obviously different for all MSI) but get created under same . The registry key can be considered as shared under .

All 3 MSI installation went fine with proper file and registry entries. but when I uninstall any of the MSI, the registry key associated with it is not getting removed. The registry key is getting removed only for the last uninstalled MSI, for first 2 uninstalled MSI it is not getting deleted.

E.g.

MSI1: HKEY_LOCAL_MACHINE\SOFTWARE\\ABC\Component1
MSI2: HKEY_LOCAL_MACHINE\SOFTWARE\\ABC\Component2
MSI3: HKEY_LOCAL_MACHINE\SOFTWARE\\ABC\Component3

MSI1 uninstall, registry key Component1 not removed.
MSI2 uninstall, registry key Component2 not removed.
MSI3 uninstall, registry key Component3 removed..

Irrespective of order, the registry key is removed only for last uninstall. Changing registry install behavior "install if absent, uninstall if present" not helped.

Is there any way, or only CustomAction is the solution?
Labels (1)
0 Kudos
1 Reply
op_kesare
Level 3

Finally I got the solution:

In ISM template, I am dynamically changing the Product GUID through script. But the MSI package GUID, Component GUID not being changed and remains same for all 3 MSI. It seems that, component GUID referred as global on the system in Windows MSI database. So when installed MSI1, MSI2, MSI3 on the system, even though product id is different, their ISRegistryComponent GUID remains same and considered as shared and so not get removed. It is only get removed when Windows MSI counter reaches to zero for that component. So on last MSI uninstall, the registry get removed.

Providing different component GUID for all MSI, resolves the registry issue.
0 Kudos