MSI Shared DLL reference count not decrement on upgrade
I have created an msi which places shared DLL file in to the folder "C:\program files\MY Product" it then created the relevant reference keys in
if I uninstall the msi the DLL are removed and the relevent keys deleted.
However if I upgrade the msi it increments the SharedDDLs reg key to 2 this means when I uninstall it doesn't remove the files
Can you please advise how to stop this so the DLL don't increment and the files are removed after uninstall
Community Chosen Answer
In the major upgrade scenario, keep the RemoveExistingProducts inbetween InstallValidate and InstallInitialize so that during upgrade older product is uninstalled first (SharedDll entry gone) and then newer product is installed. In this case SharedDll count will remain as 1.
If not make the component as not shared, if sharing is not really necessary for your case.