Upgrade/Uninstall leaves components behind ?
I'm hoping someone can throw a few idea's my way with this.
I've created a new version (Package B) of an installation with a major upgrade to remove the previous version (Package A).
When I install Package B it successfully removes Package A and installs fine, but when I checked to see if it performs a clean uninstall (after upgrading) it leaves files/components behind.
It only leaves the components/files behind if it's upgraded the Package A and if the files are in the same location. i.e. if I install Package A and then manually remove this before installing Package B, Package B will uninstall fine. Or if I install Package A and then set the components in Package B to install to a different location, Package A uninstalls in the upgrade action and when Package B is uninstalled it successfully removes the files.
So the problem only happens when Package B upgrades Package A (installing it's files to the same location) and Package B is then uninstalled.
I know that the components that are not uninstalled are being set to action:null when I run logging against the uninstall, but I've no idea why this is.
Any idea's would be much appreciated.
Cheers, Mike
I've created a new version (Package B) of an installation with a major upgrade to remove the previous version (Package A).
When I install Package B it successfully removes Package A and installs fine, but when I checked to see if it performs a clean uninstall (after upgrading) it leaves files/components behind.
It only leaves the components/files behind if it's upgraded the Package A and if the files are in the same location. i.e. if I install Package A and then manually remove this before installing Package B, Package B will uninstall fine. Or if I install Package A and then set the components in Package B to install to a different location, Package A uninstalls in the upgrade action and when Package B is uninstalled it successfully removes the files.
So the problem only happens when Package B upgrades Package A (installing it's files to the same location) and Package B is then uninstalled.
I know that the components that are not uninstalled are being set to action:null when I run logging against the uninstall, but I've no idea why this is.
Any idea's would be much appreciated.
Cheers, Mike
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
aogilmor
17 years ago
What you're seeing sounds like normal Windows installer behavior. If the component attribute is 1024 (I think, see the SDK to be sure) then the component will not be removed on uninstall. There's other attibutes which tell it to leave the component alone if it exists. Again, see the sdk (the msi.chm help file). Also, Windows Installer normally won't remove a component that's used by another application. Unless there's a really good reason to change it, I'd leave it alone. Windows installer is pretty good at figuring out which components to remove and leave alone. It should upgrade the component if it is the same or greater version than the existing one, but will leave alone otherwise (that's why you see action: null). Also, look into the InstallExecute sequence documentation, for RemoveExistingProducts action. It does different things depending on where it is in the sequence.
Hope this helps.
Hope this helps.
Posted by:
oreillyr
17 years ago
Posted by:
michaelnowell
17 years ago
Thanks for the reply oreillyr
I'd thought about that, but I assume that the removefile table just simply deletes the file and doesn't uninstall any of the reg keys that go with it, as the some of these components have been set to use '.NET COM Interop'?
I guess I could add these entries into the removefile and place other custom actions to remove the associated registry keys, but I'd really like to figure out why this is happening incase it comes back to haunt me with something else in the future.
Cheers, Mike
I'd thought about that, but I assume that the removefile table just simply deletes the file and doesn't uninstall any of the reg keys that go with it, as the some of these components have been set to use '.NET COM Interop'?
I guess I could add these entries into the removefile and place other custom actions to remove the associated registry keys, but I'd really like to figure out why this is happening incase it comes back to haunt me with something else in the future.
Cheers, Mike
Posted by:
michaelnowell
17 years ago
Posted by:
aogilmor
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.