- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: unable to run feature event during uninstallation
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
unable to run feature event during uninstallation
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:
OnBegin
OnMaintUIBefore
OnGeneratingMSIScript
OnMoving
feature Installing or Uninstalling events
OnInstallFilesActionBefore
OnInstallFilesActionAfter
feature Installed or Uninstalled events
OnMoved
OnGeneratedMSIScript
OnMaintUIAfter
OnEnd
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Try moving your code to execute before uninstalling to "OnMaintUIBefore()" and your code to execute after uninstalling to "OnMaintUIAfter()"
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello,
Because InstallShield 2011 is no longer supported, I would recommend taking a look at InstallShield 2019.
LINK to "end of life" Policy and Timeline;
https://helpnet.flexerasoftware.com/eol/installshield.htm
LINK to free 21 day evaluation of InstallShield 2019 Professional;
https://info.flexerasoftware.com/is-eval-installshield-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;
https://www.flexerasoftware.com/about-us/contact-us.html
Thank you,