【问题标题】:WiX Burn bundle installer - Handling upgrade and un-installing exe packagesWiX Burn 捆绑安装程序 - 处理升级和卸载 exe 包
【发布时间】:2017-03-04 03:02:51
【问题描述】:

我正在开发一个带有 WiX 的捆绑安装程序,其中包括一个 MSI 包和一些 EXE 包。对于 EXE 包,WiX 捆绑包安装程序似乎可以处理升级或卸载,但不能同时处理两者。是否可以使用 ExePackages 创建一个 WiX 捆绑安装程序来处理升级和卸载 ExePackages?

我遇到的第一个问题是,在卸载我的捆绑包时,它只会卸载 MSI 包,并将 EXE 安装的包留在系统上。我发现解决方案是在 ExePackage 元素中放置一个 DetectCondition。但是,DetectCondition 似乎会干扰升级 ExePackage。有了 DetectCondition,升级安装的日志显示 Exe 包的“错误 0x80070002:无法找到有效负载”。

例如,带有 DetectCondition 的 ExeBundle 部分如下所示:

<ExePackage Id="BLAH_INSTALLER"
              SourceFile="$(var.SolutionDir)\InputBin\SetupBlah.exe"
              Compressed="yes"
              InstallCommand="/install /norestart /quiet"
              UninstallCommand="/uninstall /quiet"
              RepairCommand="/repair /quiet"
              DetectCondition="BlahPresent"
              Cache="always" >
    <dep:Provides Key="IntelISA" Version="5.1.10.160" />
  </ExePackage>

还有 BlahPresent 逻辑:

<util:FileSearch
  Id="Blah_Installed"
  Path="[ProgramFiles64Folder]\Blah\blah.exe"
  Variable="BlahPresent"
  Result="exists" />

【问题讨论】:

    标签: wix exe upgrade uninstallation bootstrapper


    【解决方案1】:

    我在一个示例中发现了这个 DetectCondition,它似乎可以升级和卸载捆绑包中的 ExePackage:

    DetectCondition="WixBundleInstalled=1"
    

    这是它在 ExePackage 元素中的显示方式:

    <ExePackage Id="BLAH_INSTALLER"
                  SourceFile="$(var.SolutionDir)\InputBin\SetupBlah.exe"
                  Compressed="yes"
                  InstallCommand="/install /norestart /quiet"
                  UninstallCommand="/uninstall /quiet"
                  RepairCommand="/repair /quiet"
                  DetectCondition="WixBundleInstalled=1"
                  Cache="always" >
    

    【讨论】:

      猜你喜欢
      • 2014-01-31
      • 1970-01-01
      • 2012-02-11
      • 2021-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-20
      • 1970-01-01
      相关资源
      最近更新 更多