/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 (4)

Posted by: jagadeish 9 years ago
Red Belt
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

Posted by: anonymous_9363 9 years ago
Red Belt
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.
Posted by: EdT 9 years ago
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.
Posted by: rad33k 9 years ago
Fourth Degree Brown 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).

 
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