Kryptonic
Posts: 10
Joined: Thu Oct 16, 2008 12:43 pm

Custom message/form on uninstall?

Hi all,

As part of my prereq for installing the s/w i install a sql2005 instance... When i uninstall the product i would like a form or message box to pop up letting the user know the database wont be automatically deleted and they should do this manually!

how would i do this??

Cheers
Will
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom message/form on uninstall?

Hi Will,

This can be done by using a ScriptInline custom action scheduled under "InstallExecuteSequence" -> "Uninstall". The "Script Text" field in the Custom Action Properties page can be set to something like this:

Code: Select all

MsgBox "The database will not be removed automatically. Please remove it manually"
Please note that this custom action should have the condition:

Code: Select all

REMOVE = "ALL"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Custom message/form on uninstall?

cosmin wrote:Please note that this custom action should have the condition:

Code: Select all

REMOVE = "ALL"
Hello Cosmin,

I have the following condition to check for (complete) uninstallation (to avoid being triggered in case of an upgrade, which consists of uninstall + new install):

Code: Select all

REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE
Is my approach wrong?



With best regards

Clemens Anhuth
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom message/form on uninstall?

Hi Clemens,

No, your approach is correct. The "NOT UPGRADINGPRODUCTCODE" condition should make sure that the message is not shown during an upgrade. Please note that for an upgrade you should also make sure that the new package doesn't try to create the database again.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”