3

I am using WIX and I want to display a check box(e.g. Delete App Related Files) during uninstall that is selected by default and if selected, will trigger a custom action that will remove some app related folders. My requirements are:-

  1. Check box that is selected by default when uninstalling the app.
  2. Custom action that will be triggered on uninstall and only in case of the check box is selected.
  3. Pass the location of folder that will be deleted to the custom action; i know this can be done with Property element but i can't do that.
yo2011
  • 971
  • 2
  • 12
  • 38

1 Answers1

1

If you're shipping an MSI for your product's installer and registering it to be uninstalled by the Control Panel, there's no way to override the 'Uninstall' button to display any custom dialogs. By default windows will call 'msiexec /x <productcode>" to uninstall the product. This command will run the MSI with 'basic' UI, skipping all dialogs.

A couple options that I can think of:

  • Set ARPNOREMOVE=1 in your MSI so that the user only has the ability to run a 'Change' or Modify install from the control panel. That way you'll have the ability to display your custom dialogs.
  • Wrap your MSI in a bootstrapper (like WiX's burn) so that the bootstrapper is what handles the uninstall process from the Control Panel.
  • jbudreau
    • 1,287
    • 1
    • 10
    • 22
    • Hi jbudreau, could you give me some links on how to implement that using bootstrapper. Also, if i choose the first option, then how to change the Add/Remove Change button name to be uninstall/change as Sql server and other app such as Ccleaner do. – yo2011 Jun 15 '16 at 00:53
    • The work to make use of WiX's burn bootstrapper is pretty involved, so I'd just google around and read up if you're interested in that route. I'm not sure how the SQL Server installer registers itself in the ARP, but my guess is that they use a bootstrapper as well... – jbudreau Jun 15 '16 at 00:57