3

I'm using a bootstrapper to check for the existence and if needed install a set of 3rd party product installs. It then installs my product. I would like to include an uninstall shortcut for the full install and not just my product. However, to do that, I need to be able to set the product code for the bootstrapper and then reference it in my uninstall shortcut:

<ShortcutId="UninstallShortcut" Name="Uninstall My Product" 
   Description="Uninstalls My Product"Target="[System64Folder]msiexec.exe" 
   Arguments="/x [MyBootStrapperProductCode]" Icon="MainApp.ico"/>

I'm using the standard Wix bootstrapper, but I don't see anything within the Bundle element that will let me set the product code.

Alternately, can I prevent the bootstrapper from leaving references to itself in Add/Remove Programs? The 3rd party components are permanent deployments.

Jim Rush
  • 4,143
  • 3
  • 25
  • 27

2 Answers2

3

The Bundle doesn't work the same way as Product. It does not use msiexec to unistall, atleast not publicly.

In order to create UNISTALL shortcut for BUNDLE, you need some clever tricks. Disclaimer: only for developmental/internal use.

First; you need to pass UpgradeCode to your MSI, using this approach:

Passing command line args to MSI from WiX bundle

After that, in your MSI file, you could try searching registry value BundleUpgradeCode which equals to your UpgradeCode. If you have found the folder where value lies, you can extract UnistallString and execute it directly(using CustomAction).

It will be something like this: "C:\ProgramData\Package Cache{my GUID}\ExchangeBootStrapper.exe" /uninstall

I personally haven't implemented it yet, but couldn't find any other workaround for this problem and came up with this one.

Community
  • 1
  • 1
Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
1

I am late, but at least for the record. As I understand the products in the Chain of Burn are handled independently. So the uninstalls does. It means that you don't need the code for the whole bundle. Codes of the individual Msi files in the bundle chain will be used for the un-installation. As for permanent installation of 3d parties there is corresponding Permanent attribute. This all is quite well described in last two chapters of WiX 3.6 Guide by Ramirez N.

alehro
  • 2,198
  • 2
  • 25
  • 41