/build/static/layout/Breadcrumb_cap_w.png

MSI Shared DLL reference count not decrement on upgrade

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 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs

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

Thanks

0 Comments   [ + ] Show comments

Answers (3)

Posted by: apptopack 8 years ago
Red Belt
1

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.

Posted by: RajSam 8 years ago
Yellow Belt
0
Hi Everyone,

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

Thanks,
raj
Posted by: EdT 8 years ago
Red Belt
0
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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ