使用 StandardBootstrapperApplication 的 WiX 卸载功能

标签 wix uninstallation burn wix3.7

我已经为一组具有依赖关系的应用程序构建了一个非常基本的安装程序,它可以处理 .NET 包的重新启动。然而,我现在遇到的问题是卸载操作仅卸载安装程序本身,它显示在程序列表中。运行安装过程的所有其他 .exe 文件仍保持安装状态。有什么简单的方法来处理这个安装吗?我对 WiX 工具集还很陌生,不想深入研究自定义安装程序。这是我的包:

 <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
  xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" 
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Bundle Name="Visible EP Installer" Version="1.0.0.0" Manufacturer="VEP" UpgradeCode="8d1a4e2a-be3f-4b51-824b-75652ae98bad">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
      <bal:WixStandardBootstrapperApplication
          LicenseFile="..\VisibleEP EULA-ver2.rtf"
          LogoFile="..\VEPLogo_HeartOnlyBlack(50x50).png"
        />
    </BootstrapperApplicationRef>
    <?define NetFx45MinRelease = 378389?>
    <util:RegistrySearch
        Id="NETFRAMEWORK45"
        Variable="NETFRAMEWORK45"
        Root="HKLM"
        Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
        Value="Release"
        Result="value" />
    <Chain>
      <ExePackage Id="NetFx45Redist" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q /norestart" RepairCommand="/q"
              SourceFile="..\VEP Deploy\Setup Files\dotNetFx45_Full_setup.exe"
              DetectCondition="NETFRAMEWORK45 &gt;= $(var.NetFx45MinRelease)"
              InstallCondition="(NOT NETFRAMEWORK45 &gt;= $(var.NetFx45MinRelease))">
        <ExitCode Value="1641" Behavior="forceReboot"/>
        <ExitCode Value="3010" Behavior="forceReboot"/>
        <ExitCode Value="0" Behavior="success"/>
        <ExitCode Behavior="error"/>
      </ExePackage>
      <ExePackage
        SourceFile="..\VEP Deploy\Setup Files\Encoder_en.exe"
        Permanent="no"
        InstallCommand="/q"
        RepairCommand="/q">
        <ExitCode Behavior="success"/>
      </ExePackage>
      <ExePackage
        SourceFile="..\VEP Deploy\Setup Files\vcredist_x86.exe"
        Permanent="no"
        InstallCommand="/q"
        RepairCommand="/q">
        <ExitCode Behavior="success"/>
      </ExePackage>
      <ExePackage
        SourceFile="..\VEP Deploy\Setup Files\vcredist_x64.exe"
        Permanent="no"
        InstallCommand="/q"
        RepairCommand="/q">
        <ExitCode Behavior="success"/>
      </ExePackage>
      <ExePackage
        SourceFile="..\VEP Deploy\Setup Files\vep_setup.exe"
        Permanent="no">
        <ExitCode Behavior="success"/>
      </ExePackage>
        </Chain>
    </Bundle>
</Wix>

我知道处理最后几个退出代码有点老套,但我目前并不那么担心,只要它不影响我的其他问题即可。

最佳答案

您必须提供 UninstallCommand 属性值,以便 Burn 知道如何卸载 .exe。

关于使用 StandardBootstrapperApplication 的 WiX 卸载功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17301381/

相关文章:

windows - 开始使用 WiX 的建议?

msbuild - WiX 和 Visual Studio Web 部署项目的问题

c# - MVC 网络应用程序 WIX 安装程序

html - 关于 :config? 的 Firefox anchor 链接

android - 如何从设备上的命令行卸载 android 应用程序

wix - 为 WiX Burn 捆绑多个支持文件

c# - 文件计数保存在哪里?

wix - 微星 : How a Service is stopped on uninstall during InstallValidate - could that work anyway?

WIx - 尝试查看 SQL SMO 值是否存在时出现 "Registry key not found"

WiX bundle 升级 : a new version of MSI is installed before the old version is removed