Reference count wrong after Nullsoft->MSI upgrade
Posted 15 June 2010 - 21:23
The problem that I have is that prior to the Nullsoft uninstall being executed, the MSI determines that "another" application has already installed the files that it includes, so later on when it writes the registry information it gives all of these files a reference count of 2. This obviously causes a problem when you uninstall the MSI since it simply decrements the ref count to 1 and doesn't remove any files.
Just to outline, I have the following scenario:
Detect Nullsoft installation.
MSI sees existing files from Nullsoft install and thinks another application is using them.
Silently execute Nullsoft uninstall (removing the files).
MSI writes registry entries including SharedDLLs ref counts set to 2.
Uninstalling the MSI results in no files being removed.
Does anyone have any ideas on how to get around this?
Posted 16 June 2010 - 07:39
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 16 June 2010 - 11:53
|Move the uninstall action to the top of the sequence, conditioned appropriately.|
Did Nullsoft create the ShareDll ref count with a value of 1? If it didn't (and your only problem is the existance of the files, not the ShredDLL count registry entries) then you could work around this by not setting the msidbComponentAttributesSharedDllRefCount attribute of the component.
Posted 16 June 2010 - 15:35
I'm starting to think that my only option is going to be to make a custom action that decrements the reference counts of these files by 1 at the end of the upgrade.
Posted 17 June 2010 - 08:15