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
- :
- -uninst
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
‎Aug 19, 2008
10:59 AM
OnUninstall not invoked from Add/Remove Programs?
I want to execute some InstallScript code in an InstallScript MSI application when, and only when, the user uninstalls the application from within Add/Remove Programs. I thought the UnInstall() function, found in the Miscellaneous section, would do this. But when I uninstall my application via Add/Remove Programs, function UnInstall() does not seem to be invoked! I put in a messagebox just as a test, and never saw the messagebox.
Is there another function I can use? OnMaintUIAfter is not appropriate, because it might be a MODIFY or REPAIR type install, not an uninstall. OnEnd is not appropriate because that function is always invoked (installing + uninstalling).
Any ideas?
Is there another function I can use? OnMaintUIAfter is not appropriate, because it might be a MODIFY or REPAIR type install, not an uninstall. OnEnd is not appropriate because that function is always invoked (installing + uninstalling).
Any ideas?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2008
11:35 AM
Guess I'm not awake yet today. 😮
Function OnMaintUIAfter( ) can be used for this, by testing REMOVEALLMODE:
However, I still maintain it's a little misleading that a built-in function named OnUninstall( ) is not executed when you uninstall! :rolleyes:
Function OnMaintUIAfter( ) can be used for this, by testing REMOVEALLMODE:
if REMOVEALLMODE!=0 then
MessageBox("This code runs only when ininstalling.", INFORMATION);
endif;
However, I still maintain it's a little misleading that a built-in function named OnUninstall( ) is not executed when you uninstall! :rolleyes:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2008
03:08 PM
OnUninstall only gets called when using the -uninst parameter to setup.exe.