/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (5)

Posted by: aogilmor 16 years ago
9th Degree Black Belt
2
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.
Posted by: oreillyr 16 years ago
Fifth Degree Brown Belt
0
Have you tried putting them in the RemoveFile table? Is it files that are getting left behind? You could always create a custom action to only work on uninstall:

REMOVE~="ALL" in Install Execute sequence
Posted by: michaelnowell 16 years ago
Second Degree Blue Belt
0
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
Posted by: michaelnowell 16 years ago
Second Degree Blue Belt
0
Thanks aogilmor, that set me on the right track and after reading the SDK I figured it out. I needed to sync the guids of the components. Works a treat now !
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
glad I could help (if you wanna give me a few rating points I would not argue. been falling behind these other guys) :-)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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