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

Unable to trigger 'OnUninstall' event.

Hi,
I m using Installshield 2008. OnUninstall event is not getting called when I 'm trying to uninstall the product through startmenu. can anyone help me to sort it out.
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

Are you uninstalling from a shortcut? If so, what are the shortcut properties (specifically the command line)? What type of project (InstallScript or InstallScript MSI)?
0 Kudos
Essien
Level 4

yes i m trying to uninstall from startcut(StartMenu Programs Folder) this is the commandline parameter i m using
"szCommand = UNINSTALL_STRING + " /M" + PRODUCT_GUID;"

It's an "InstallScript MSI" Project


Thanks
0 Kudos
RobertDickau
Flexera Alumni

I haven't tried it myself, but the help topic for OnUninstall states:
This event is triggered only if the Enable Maintenance setting in the Project Properties area of the General Information view is set to No. If this setting is set to Yes, the OnMaintUIBefore and OnMaintUIAfter event handler functions are launched.
Does your project have that setting?

As an aside, the help topic "Creating Uninstallation Shortcuts for InstallScript and InstallScript MSI Projects" contains information that might be of interest.
0 Kudos
LGrooms
Level 3

I am having the exact same issue. And yes I did set the Maint flag to "No".

Anyone know of a workaround for this bug?

(How did this one get through QA?)
0 Kudos
LGrooms
Level 3

I found a work-around (I think). First, make sure the Maint flag is "Yes" which will enable the OnMaintUIAfter event. You can check to see if you are in uninstall mode from there. Hope that helps someone out there. Here is a code snip:


function OnMaintUIAfter()
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
NUMBER bOpt1, bOpt2;
begin

....
if( REMOVEALLMODE ) then
0 Kudos