【问题标题】:Install from WiX bundle, upgrade with MSI results in multiple versions installed从 WiX 包安装,使用 MSI 升级会导致安装多个版本
【发布时间】:2016-01-15 04:30:24
【问题描述】:

我有一个应用程序,它的安装程序可以以两种形式交付:

  1. 一个 MSI 包;和
  2. 包含软件包的 WiX 捆绑包以及一些链接的先决条件。

大多数用户会选择安装捆绑包,但我希望保留手动安装先决条件和 MSI 包的可能性。

我的自动更新过程包括下载新的 MSI 软件包并进行重大升级。只要该应用程序最初是使用 MSI 软件包安装的,它就可以完美运行。但是,如果应用程序是从捆绑包中安装的,我最终会并排安装两个版本。

如何确保使用下载的 MSI 进行的升级正确替换或删除了原始捆绑包?


Bundle.wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Bundle Name="The Product" Version="!(bind.packageVersion.TheProduct.Msi)" Manufacturer="TheCompany" UpgradeCode="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication
          LicenseFile="Resources\license.rtf"
          LogoFile="Resources\logo.png" />
    </BootstrapperApplicationRef>

    <Chain>
      <PackageGroupRef Id="NetFx451Web" />
      <MsiPackage Id="TheProduct.Msi" SourceFile="$(var.TheProduct.Msi.TargetPath)" Vital="yes" Compressed="yes" />
    </Chain>
  </Bundle>
</Wix>

Product.wxs(MSI):

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="TheProduct" Language="1033" Version="!(bind.fileVersion.TheProduct.dll)" Manufacturer="TheCompany" UpgradeCode="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perUser" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <UIRef Id="WixUI_Minimal" />
  </Product>
    <!-- ... snip ... -->
</Wix>

【问题讨论】:

    标签: wix


    【解决方案1】:

    .msi 包无法升级捆绑包;只有另一个捆绑可以做到这一点。但是 .msi 包可以升级最初由捆绑包安装的 .msi 包。您在 ARP 中获得了两个条目,而不是并排安装了两个软件包。 @Ravi 的回答是正确的:使用 ARPSYSTEMCOMPONENT 确保 .msi 包不可见,以匹配捆绑包的安装方式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-17
      • 1970-01-01
      • 2013-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多