cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Newmarket
Level 4

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 :)). 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
(8) Replies
Newmarket
Level 4

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
Level 10 Flexeran
Level 10 Flexeran

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

But even with InstallShield 2018 and a simple InstallScript MSI Project I don't even see OnMaintUIAfter get called during the uninstall of that project, much less any uninstall related feature events.  Why even have uninstall feature events defined if they are so unlikely to ever occur?

0 Kudos

Hi @JEichenberger ,

I tried in the latest version of Installshield, where I could see the  OnMaintUIAfter event is getting called during the uninstall from the Add/Remove program.

So, can you share a sample project through the private message where we could reproduce it . so that the issue can be analyzed and can propose a proper solution. 

0 Kudos

Hi @banna_k,
I find the Flexera Community confusing and difficult to use with very poor help and search engines. Please explain how one can "private message" and I will do so.
0 Kudos

Hi @JEichenberger,
I have sent you a Private message, actually the option is available in the top right corner with a mail symbol.
0 Kudos

My primary concerns have not been answered, not even in private messages.

Perhaps 2018 R2 resolves at least one of the minor issues.  But the cost to upgrade just to resolve such a thing seems prohibitive.

0 Kudos

I think I have figured out what is causing me the most issue as it relates to the uninstall process.  Logging gets disabled.

I have been claiming that the uninstalled events for features do not get called, and other such things that happen after "moving data" during an uninstall.  But as was pointed out to me once, a MessageBox appears from a feature uninstalled function.  Still, it is very difficult to debug an uninstall process if logging is disabled.

So, how do I force logging to be enabled?

Specifically, how do I get SprintfMsiLog to appear in log files for the second half of what actually happens during an uninstall process? Why does logging get disabled in the first place?

0 Kudos