cancel
Showing results for 
Search instead for 
Did you mean: 
Newmarket
Pilgrim

Feature Events not Called on Uninstall from Major Upgrade

I've seen this issue brought up a number of times in the forums but have yet to see a DEFINITIVE response from anyone that can say for certain what the expected behavior is.

I have an existing InstallScript MSI installation that has a number of feature events including _OnUninstalling and _OnUninstalled. I've created a Major Upgrade set to "Completely uninstall old setup before installing new setup". When the old setup is "Completely uninstalled", the feature events of the old setup do not get called (which doesn't sound very "complete" to me Smiley Happy). The feature events get called just fine when the product is uninstalled from Add/Remove Programs.

Is it expected behavior that feature events are not called when the installer is launched by RemoveExistingProducts?

Can anyone explain?

Is there a recommended workaround?

Thank you!
Labels (1)
0 Kudos
2 Replies
Newmarket
Pilgrim

Still hoping for a legitimate response...

Hello All,

Just hoping to bump this back onto the list. Does anyone have a legitimate response? Before we ship our next release I think I may need to call all of my _Uninstalling handlers directly in OnMaintUIBefore( ) or OnFirstUIBefore( ) when a MAJOR UPGRADE is detected in order to execute the processes to completely remove the previous version since the uninstall of the previous version doesn't seem to handle them all.

Thank you.
0 Kudos
joshstechnij
Pilgrim

Re: Feature Events not Called on Uninstall from Major Upgrade

No InstallScript events are called during the uninstall of an old product running during a major upgrade. The InstallScript engine for the old product is called in a very limited sense, in that it is used to removed the uninstall key, the cached installation information, and any logged InstallScript resources. However, because these things alone do not generate any events, no events will be called in this scenario.

There are a couple of ways to work around the behavior, but the best method would be to handle the upgrade during installation of the new product.
0 Kudos