This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Custom InstallScript Action During Uninstall?
Subscribe
- 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
May 05, 2009
02:15 PM
Custom InstallScript Action During Uninstall?
Project Type: InstallScript MSI
I've been trying figure out how to create an InstallScript custom action to run during uninstallation but have yet to succeed. We need to run some external apps to unregister services and perform other cleanup. Actually, it would be best if this could happen during maintenance and upgrades as well. I've tried to detect the uninstall at the InstallScript level to no avail. Sometimes my conditions were true during first install despite the property being named REMOVE. I've also tried sequencing a custom InstallScript action with the Installed condition. My custom action does not get executed, as near as I can tell.
So my question is, what exactly needs to be done to execute an external app during the uninstall sequence for an InstallScript MSI project? The external apps we need to run are installed with the software so the action needs to happen before the installed files are removed.
I've been trying figure out how to create an InstallScript custom action to run during uninstallation but have yet to succeed. We need to run some external apps to unregister services and perform other cleanup. Actually, it would be best if this could happen during maintenance and upgrades as well. I've tried to detect the uninstall at the InstallScript level to no avail. Sometimes my conditions were true during first install despite the property being named REMOVE
So my question is, what exactly needs to be done to execute an external app during the uninstall sequence for an InstallScript MSI project? The external apps we need to run are installed with the software so the action needs to happen before the installed files are removed.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 05, 2009
06:36 PM
If your project type is InstallScript MSI (not Basic MSI), you should be able to use event handlers like OnMaintUIBefore() or OnMaintUIAfter() inside which check maintenance type and proceed. Following is basic prototype:
HTH,
Peter
OnMaintUIBefore()
...
nType = SdWelcomeMaint(...);
switch (nType)
case MODIFY:
...
case REPAIR:
...
case REMOVEALL:
...
default:
(error out)
end;
HTH,
Peter