/build/static/layout/Breadcrumb_cap_w.png

Software Deployment Question


MSI Shared DLL reference count not decrement on upgrade

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

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

Comments



Community Chosen Answer

1
Where did you sequence RemoveExistingProduct standard action in execute immediate?
Is it sequenced in between, InstallValidate & InstallInitialize
or
Is it sequenced after InstallFinalize
or 
Is it sequenced after InstallInitialize

Answered 07/25/2015 by: jagadeish
Red Belt

All Answers

0
You should only use the shared "functionality" for truly shared components. If the DLL is being placed in a discrete product folder, it's not shared and should therefore not be assigned as such. Shared DLLs generally end up in System32.
Answered 07/18/2015 by: VBScab
Red Belt

0
Why are you using the shared DLL registry key at all? This is a legacy mechanism that was used before MSI technology was released, and MSI now tracks shared files based on the component GUID.  If you must use the shared DLL registry key, then your upgrade should be written with a custom action that runs at the end of the upgrade which decrements the shared DLL count that the upgrade has incremented.
Answered 07/19/2015 by: EdT
Red Belt

0

The problem is that probably you have broken Windows Installer Best Practices - Organizing Applications into Components. Please make sure that Coponent ID of the shared DLL file in the newer package is exactly the same as in the older one. If these are unsynchronised it will behave like you described - DLL counter increments as Windows Installer assumes that two separate products have been installed (because of different Component Codes).

Answered 07/20/2015 by: rad33k
Fourth Degree Brown 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