cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
benland
Level 3

Uninstall issues

Hi,
I need some help with my installation.
I want to display a dialog after UN-installation of my product.

How can i display a dialog.

Thanks ,
Ben
Labels (1)
0 Kudos
(7) Replies
Shuttledude
Level 7

If you are working with an InstallScriptMSI project, then in your setup.rul script you can use the OnEnd( ) function, which is the last function that runs during an install or uninstall. You can see the OnEnd( ) function in setup.rul by clicking the leftmost drop-down control at the top of the script editor window and selecting "After Move Data", then selecting "OnEnd" in the drop-down control just to the right.

For example, here is some script that will display a "thank you" goodbye message, which is presented to the user after they click the Finish button on the final uninstallation dialog (the use of the REMOVEALLMODE parameter will prevent this from happening during an install or repair):

//---------------------------------------------------------------------------
// OnEnd
//
// The OnEnd event is called at the end of the setup. This event is not
// called if the setup is aborted.
//---------------------------------------------------------------------------
function OnEnd()
begin
if(REMOVEALLMODE) then
MessageBox("Thank you for using our products.", INFORMATION);
endif;
end;
0 Kudos
benland
Level 3

Thank you Shuttledude for the fast replay,
I am using a basic MSI project.
Is there a way I can show a dialog on uninstall.
Or use an install scrip during uninstall of basic msi project?

Thanks,
Ben
0 Kudos
Shuttledude
Level 7

What you could do is this:

1. Write an installscript function, or a VBscript function, that displays a messagebox dialog.

2. Create a Custom Action that uses the function you wrote.

3. Insert the Custom Action into the Execute Sequence just before InstallFinalize.

4. To make sure the Custom Action fires (i.e., to make sure your function only runs) during an UNINSTALL, set this condition: REMOVE = "ALL" (you can set conditions in the "Conditions" field of the "Sequence" tab when you click on your Custom Action in the sequence).

Be aware that this will still display your action BEFORE the final InstallShield dialog appears (but AFTER the files have been uninstalled). If you want the dialog to appear after the final InstallShield dialog has disappeared, read this post for more information: http://community.acresso.com/showthread.php?t=175033
0 Kudos
benland
Level 3

Thanks again!

Is there a way to show the SetupCompleteSuccess dialog at the end of the uninstall?
If it is true, I will show this dialog and add text with the condition REMOVE="ALL". but so far I can make it show after the uninstall finish.


Thanks

Ben
0 Kudos
Shuttledude
Level 7

Here's one possibility (this is an excerpt from InstallShield Help):

The SdShowAnyDialog function displays a custom or modified dialog. This function is recommended for advanced users only.

Syntax: SdShowAnyDialog ( szTitle, szID, nID, nReserved );


In this case, the "modified dialog" is the SetupCompleteSuccess dialog that you've modified to show your custom text message. And your Custom Action could invoke SdShowAnyDialog( ). Or you could copy the SetupCompleteSuccess dialog, rename the copy (e.g. "MyFinalDialog") and then have the Custom Action invoke SdShowAnyDialog to display MyFinalDialog. But this seems strained and unnatural somehow; must be a better way of doing it.

Good luck, hope I've helped. 🙂
0 Kudos
benland
Level 3

Thanks Shuttledude!
you helped a lot.
What I finally did is : I created a function that is running :
SdFinish ( "Uninstall Completed" , "My uninstall text", "" , "" , "" , n , n );
then I created a custom action that is running this function in the condition:
REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE
then I run it after:
ISSelfRegisterFinalize.


This is working great.

Ben 🙂 🙂
0 Kudos
Shuttledude
Level 7

Ahhh ... I did not know about the UPGRADINGPRODUCTCODE parameter, thanks for letting me know about that.

Glad everything worked out for you!! 😄
0 Kudos