Setup Project Uninstall Custom Action

J

Joe Cool

I have designed an app that I have setup a VS2008 Setup project. I
have Install and Uninstall Custom Actions. I have also configured the
setup to remove a previous version first if necessary. All this works
fine. Well, not completely. The Uninstall Custom Action fires if I
perform an Uninstall function in the control panel.

However, if I upgrade an existing installation with a newer version,
when the previous version is automatically removed, my Uninstall
Custom Action does NOT fire.

Any ideas why?
 
P

Peter Duniho

Joe said:
I have designed an app that I have setup a VS2008 Setup project. I
have Install and Uninstall Custom Actions. I have also configured the
setup to remove a previous version first if necessary. All this works
fine. Well, not completely. The Uninstall Custom Action fires if I
perform an Uninstall function in the control panel.

However, if I upgrade an existing installation with a newer version,
when the previous version is automatically removed, my Uninstall
Custom Action does NOT fire.

Any ideas why?

Not something I have experience with, so no specific ideas.

But, how is the "automatic removal" being handled? Is it part of the
_installation_ of your new version? Or does the new version's
installation simply run the previous versions uninstall script?

If the latter, then that seems like a bug to me. Running the uninstall
for the previous version should, I would think, include invocation of
your uninstall custom action.

If the former, then perhaps the fix is as simple as somehow getting the
automatic removal to occur via the uninstall of the previous version.

Pete
 
J

Joe Cool

Not something I have experience with, so no specific ideas.

But, how is the "automatic removal" being handled?

That is the question. I have no idea, I was hoping one of the MVPs
here would.

It is setup (which you may probably already be aware of) is:

1. Set the Setup project's DetectNewerInstalledVersion property to
True.
2. Set the Setup project's RemovePreviousVersions property to true.
3. Make sure the Setup project's Version propery has a vaslue greater
than the currently installed version.
4. Make sure all solution project's Assembly Version is set to the
same value as the Setup project's Version property.
 Is it part of the
_installation_ of your new version?  Or does the new version's
installation simply run the previous versions uninstall script?

I suspect the former since my uninstall custom action is obviously not
happening.

And IMHO that;s a bug, it should be the latter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top