Hi All,
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

0 Comments   [ + ] Show Comments


Please log in to comment

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.

Answered 01/11/2016 by: apptopack
Red Belt

Please log in to comment


Hi Everyone,

I am facing the same issue.can anyone explain the how to handle this.

Answered 12/30/2015 by: RajSam
Yellow Belt

Please log in to comment
Simple - stop using two different schemes for reference counting. You are mixing the legacy method using the sharedDLLs machine registry key, with the newer method that MSI uses based on component GUID.  Stop using the legacy method and stick with the MSI method only.
Answered 12/30/2015 by: EdT
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity