【问题标题】:Upgrade Product using WIX installation使用 WIX 安装升级产品
【发布时间】:2013-02-25 20:41:22
【问题描述】:

您好,下面是我为版本 1 和版本 2 设置的设置。但是当我安装 MSI 包进行升级时,会弹出消息框并要求从添加/删除程序中删除以前的安装版本,而不是自行删除旧版本自动安装并安装新版本。

请让我知道任何需要修改的设置。

版本 1 设置如下:

  <Product Id="*" Name="CBUDirectMSI" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="5fa35d9d-5b5a-40f0-9607-e381e728a146">

        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>

        <Upgrade Id="5fa35d9d-5b5a-40f0-9607-e381e728a146">
          <UpgradeVersion Property="OLD_VERSION_FOUND" 
           Minimum="1.0.0.0" 
           Maximum="2.0.0.0" 
           IncludeMinimum="yes" 
           IncludeMaximum="no" 
           OnlyDetect="no" 
           IgnoreRemoveFailure="no" 
           MigrateFeatures="yes" 
           Language="1033" />
          <UpgradeVersion 
          Property="NEWER_VERSION_FOUND" 
          Minimum="2.0.0.0" 
          IncludeMinimum="no" 
          OnlyDetect="yes" 
          Language="1033" />
        </Upgrade>

        <Condition Message="A newer version of [ProductName] is already installed. Exiting installation.">

        </Condition>

        <InstallExecuteSequence>
          <InstallExecute Before="RemoveExistingProducts" />
          <RemoveExistingProducts Before="InstallFinalize" />
        </InstallExecuteSequence>
    </Product>

版本 2 设置

<Product Id="B55596A8-93E3-47EB-84C4-D7FE07D0CAF4" Name="CBUDirectMSI" Language="1033" Version="2.0.0.0" Manufacturer="" UpgradeCode="5fa35d9d-5b5a-40f0-9607-e381e728a146">

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>


    <Upgrade Id="5fa35d9d-5b5a-40f0-9607-e381e728a146">
      <UpgradeVersion Property="OLD_VERSION_FOUND" 
       Minimum="1.0.0.0" 
       Maximum="2.0.0.0" 
       IncludeMinimum="yes" 
       IncludeMaximum="no" 
       OnlyDetect="no" 
       IgnoreRemoveFailure="no" 
       MigrateFeatures="yes" 
       Language="1033" />
      <UpgradeVersion 
      Property="NEWER_VERSION_FOUND" 
      Minimum="2.0.0.0" 
      IncludeMinimum="no" 
      OnlyDetect="yes" 
      Language="1033" />
    </Upgrade>

    <Condition Message="A newer version of [ProductName] is already installed. Exiting installation.">

    </Condition>

    <InstallExecuteSequence>
      <InstallExecute Before="RemoveExistingProducts" />
      <RemoveExistingProducts Before="InstallFinalize" />
    </InstallExecuteSequence>
</Product>

Wix Installer 可以识别较新版本,但不会删除旧版本并安装较新版本;并给出下面的消息框“但我仍然收到错误消息框,上面写着“已经安装了该产品的另一个版本。无法继续安装此版本。要配置或删除此产品的现有版本,请使用“控制面板”上的“添加/删除程序”。

谁能告诉我哪里出错了。

【问题讨论】:

    标签: xml wix installation wix3.6


    【解决方案1】:

    我建议使用MajorUpgrade 标记而不是您当前正在实施的UpgradeMajorUpgrade 使用起来要简单得多。

    <MajorUpgrade
        Schedule="afterInstallInitialize"
        DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit.">
    

    示例来自:http://wix.sourceforge.net/manual-wix3/major_upgrade.htm

    【讨论】:

      猜你喜欢
      • 2011-11-13
      • 1970-01-01
      • 2012-03-17
      • 2017-02-27
      • 1970-01-01
      • 1970-01-01
      • 2013-05-15
      • 1970-01-01
      • 2015-12-27
      相关资源
      最近更新 更多