Software Deployment Question

MSI Shared DLL reference count not decrement on upgrade

07/17/2015 1522 views
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


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

All Answers

Hi Everyone,

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

Answered 12/30/2015 by: RajSam
Yellow Belt

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

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