2

I've created a WiX bundle that simply installs a VC redist and than an MSI.

Looks as follows:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Bundle Name="Thrust" Version="1.1.0.0" Manufacturer="Maker" UpgradeCode="e356a490-31a8-4c0b-9aeb-82cbf3350082">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />

        <Chain>
            <!-- Install Required VCRedist -->
            <PackageGroupRef Id="VCRedist"/>
            <!-- Install Thrust Msi -->
            <MsiPackage Id="ThrustInstaller"
                Cache="yes" Compressed="yes" Visible="yes"
                DisplayInternalUI="no"
                SourceFile="..\ThrustInstaller\bin\Release\ThrustInstaller.msi">
            </MsiPackage>
        </Chain>
    </Bundle>
    <Fragment>

        <util:RegistrySearch 
                             Variable="IsVCInstalled"
                             Root="HKLM"
                             Key="SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64"
                             Value="Installed"
                             Win64="yes"
                             />

        <util:RegistrySearch 
                             Variable="VCVersionMajor"
                             Root="HKLM"
                             Key="SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64"
                             Value="Major"
                             Win64="yes"
                             />
        <util:RegistrySearch 
                             Variable="VCVersionMinor"
                             Root="HKLM"
                             Key="SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64"
                             Value="Minor"
                             Win64="yes"
                             />
        <util:RegistrySearch 
                        Variable="VCVersionBld"
                        Root="HKLM"
                        Key="SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64"
                        Value="Bld"
                        Win64="yes"
                        />
        
        <WixVariable Id="WixMbaPrereqLicenseUrl" Value="" />
        <WixVariable Id="WixMbaPrereqPackageId" Value="VCRedist" />
        <PackageGroup Id="VCRedist">
            <ExePackage Id="VCRedist"
                        SourceFile="..\..\external\VC_redist.x64.exe"
                        InstallCommand="/q /norestart"
                        Cache="no"
                        PerMachine="yes"
                        Permanent="yes"
                        Vital="yes"
                        Compressed="yes"
                        DetectCondition="IsVCInstalled AND VCVersionMajor >= 14 AND VCVersionMinor >= 27 AND VCVersionBld >= 29016"
                        InstallCondition="1"/>
        </PackageGroup>
    </Fragment>
</Wix>

The VC redist installation works as expected.

However, when installing a bundle with the same version but different internal version of the MSI, I can see that the MSI is being installed, but I'm getting duplicated entries for the bundle in the ARP(only 1 entry for the MSI as expected).

In the MSI I'm allowing same version upgrades:

<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

I'm guessing that the reason for the two entries in the ARP is that the bundle doesn't allow same version upgrades?

I'm not satisfied with the answer in how-to-do-major-upgrades-when-using-burn-wix-3-6, It suggests to upgrade the bundle version. Can't I achieve a behavior s.t if the MSI version is different from the one installed, but the bundle version is the same, it will not cause duplicated ARP entries?

Thanks.

  • Does this answer your question? [Upgrade a bootstrapper bundle if the same version is detected](https://stackoverflow.com/questions/26596354/upgrade-a-bootstrapper-bundle-if-the-same-version-is-detected) – Sean Hall Jul 08 '22 at 14:58

0 Answers0