I've got a similar requirement. In order to only conditionally uninstall, each "major upgrade" needs to have a new upgrade code and product code. In my use case the application will only be installed by a bundle, so I can add a related bundle with an action of detect and conditionally request the uninstall of the related bundle (in my case I want a check box on the UI, and let the user decide if they wish to remove the older version). This will allow multiple versions of an application to peacefully co-exist (unique component id's, unique install folders).
Either way, I believe to get the functionality you want will require a custom BA (I don't think a BA function DLL has all the callbacks in that you would need to just augment WixStdBA). -----Original Message----- From: CALCEL Sebastien [mailto:sebastien.cal...@econocom-osiatis.com] Sent: Thursday, November 06, 2014 4:34 AM To: 'wix-users@lists.sourceforge.net' Cc: FAURE Helian Subject: [WiX-users] Major Upgrade : Conditional uninstallation on even version number Hello everyone, I would like to know if there is a mean to make the uninstallation of previous versions conditional in the case of a Major Upgrade. Here's the context : We recently migrated our application setup from the VS 2008 MSI project. We now have a WiX installer project for the app and a bootstrapper project which embed the output MSI of the first one plus dependencies. Now our client asks us to prevent older versions of the app to be removed if the current installation version number is uneven. In resume : 4.0.3 => no older versions uninstallation. 4.2.0 => older versions uninstall. Could someone tells me if this is possible ? And if it is, how do do so ? Here's the beginning of the app installer wxs : <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?define FullMaintVersion="!(bind.FileVersion.AppMainFolder_App)" ?> <?define version="4.3.0" ?> <?define UpgradeCode="{509102D1-A560-4552-A115-8C27D82DEB86}" ?> <Product Id="{3ADE095D-AAE3-4DA7-A872-AFDB7A8BFDA2}" Name="App 4.3.0" Version="$(var.version)" Language="1036" Manufacturer="APCbyS" UpgradeCode="$(var.UpgradeCode)"> <Package Id="*" Description="Maint2Install 4.3.0" Keywords="Installer" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <InstallExecuteSequence> <Custom Action="SetCustomActionDataValue" After="InstallFiles" /> <Custom Action="LaunchOlderExe" After="SetCustomActionDataValue" /> <!--<RemoveExistingProducts After='InstallInitialize'>PREVIOUSFOUND</RemoveExistingProducts>--> </InstallExecuteSequence> <Media Id="1" Cabinet='data.cab' EmbedCab='yes'/> Thanks in advance, Sébastien. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users