Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

unable to run feature event during uninstallation

Hi guys,

During my installer, I found the Uninstalled events never called. For example, for Document feature, we specified DocumentUninstalled installscript function but it didn't called during uninstallation.

As I learn from the Installshield document, the uninstallation procedure works as below:

feature Installing or Uninstalling events
feature Installed or Uninstalled events
Labels (1)
0 Kudos
(6) Replies
Level 7

Try moving your code to execute before uninstalling to "OnMaintUIBefore()" and your code to execute after uninstalling to "OnMaintUIAfter()"

0 Kudos

Even that never occurs for me during uninstall.
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

Hi @JEichenberger ,

InstallScript MSI is an hybrid project of windows installer and installscript. the msi will be uninstalled and the msi log will be closed during the "moving data" by windows installer. So after "moving data" during an uninstall, the msi handle will be closed and the ISMSI_HANDLE resets to 0. Hence the SprintfMsiLog and the MsiGetProperty do not function properly during the script events after "moving data" (like OnMoved, OnMaintUIAfter,  OnEnd..), because the msi is already uninstalled by the windows installer. 


I hate that answer, but at least it explains things nicely.
0 Kudos
Level 2 Flexeran
Level 2 Flexeran


Because InstallShield 2011 is no longer supported, I would recommend taking a look at InstallShield 2019.

LINK to "end of life" Policy and Timeline;

LINK to free 21 day evaluation of InstallShield 2019 Professional;

If you would like to connect directly with a rep to discuss the latest release of InstallShield, here is a LINK to our "contact us" submission form;

Thank you,

0 Kudos