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

Reply via email to