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

Please log in to comment

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

Please log in to comment

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

Please log in to comment
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

Please log in to comment
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
Orange Senior Belt

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