【问题标题】:Denial of installation WIX Installer拒绝安装 WIX 安装程序
【发布时间】:2021-08-20 09:42:57
【问题描述】:

我制作了一个引导程序(引导程序是一个安装程序,其中包含其他安装程序以组合在一起,在这种情况下将是我的应用程序和 SQL Express 数据库安装程序)。当我启动引导程序时,屏幕上会显示 SQL Express 安装窗口,如果我关闭窗口,我的应用程序仍处于设置状态,我需要如果用户关闭 SQL Express 安装窗口,则不会安装我的程序。

<?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="Bootstrapper" Version="1.0.0.0" Manufacturer="MyCompany AboutUrl="https://mycompany.ru/"
         Copyright="ol raits rezervit" UpgradeCode="1788BF21-18BD-49E8-A572-DD38F9B67A88">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server"
                         Result="exists" Variable="SQLExpressInstalled_x64" Win64="yes"/>
    <Chain>
      <ExePackage SourceFile="SQL2019-SSEI-Expr.exe" DetectCondition="SQLExpressInstalled_x64" Permanent="no"></ExePackage>
      <MsiPackage SourceFile="MyProgram.msi"></MsiPackage>
    </Chain>
  </Bundle>
</Wix>

【问题讨论】:

    标签: installation wix


    【解决方案1】:

    添加“Vital”对您来说是一个有用的建议吗? 我已在您提供的代码示例中将此建议添加为 ExePackage 的最后一个参数。

    “重要” 指定包是否必须成功才能使链继续。默认的“yes”表示如果包失败,则链将失败并回滚或停止。如果指定“否”,则即使包报告失败,链也会继续。

    <?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="Bootstrapper" Version="1.0.0.0" Manufacturer="MyCompany AboutUrl="https://mycompany.ru/ "Copyright="ol raits rezervit" UpgradeCode="1788BF21-18BD-49E8-A572-DD38F9B67A88">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
        <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server"
                             Result="exists" Variable="SQLExpressInstalled_x64" Win64="yes"/>
        <Chain>
          <ExePackage SourceFile="SQL2019-SSEI-Expr.exe" DetectCondition="SQLExpressInstalled_x64" Permanent="no" Vital="yes"></ExePackage>
          <MsiPackage SourceFile="MyProgram.msi"></MsiPackage>
        </Chain>
      </Bundle>
    </Wix>

    参考 - https://wixtoolset.org/documentation/manual/v3/xsd/wix/exepackage.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多