Wix:获取WixUI_minimal以显示何时使用引导程序

时间:2019-02-25 15:16:07

标签: wix

我对Wix有点陌生。我创建了一个引导程序来检查并安装.NET版本4框架(如果不存在)。在我的msi程序包中,我使用的是WixUI_minimal安装程序界面。当我运行bootstrapper.exe时,将显示标准的bootstrapper UI而不是WixUI_minimal。有没有办法显示WixUI_minimal并在后台安装.NET框架而不显示引导程序UI?我在这里有什么选择?任何提示将不胜感激。谢谢。

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
  xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Bundle Name="BootstrapperRedist" Version="1.0.0.0" Manufacturer="Testment Technologies" UpgradeCode="3f40cdd1-640d-4fe6-8edb-17a308d8f227">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
        <Chain>
      <PackageGroupRef Id="NetFx40ClientRedist"/>
      <MsiPackage Id="MyApplication" SourceFile="$(var.MicroSynSetupProject.TargetPath)"/>
        </Chain>
    </Bundle>
  <Fragment>
    <!-- Check for .NET 4.0 -->
    <util:RegistrySearch Root="HKLM"
                         Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                         Value="Version"
                         Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM"
                         Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                         Value="Version"
                         Variable="Netfx4x64FullVersion"
                         Win64="yes" />
    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full"
                  DisplayName="Microsoft .NET Framework 4.0"
                  DownloadUrl="http://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe"
                  Compressed="no"
                  Cache="yes"
                  PerMachine="yes"
                  Permanent="yes"
                  Protocol="netfx4"
                  Vital="yes"
                  SourceFile=".\dotNetFx40_Full_x86_x64.exe"
                  InstallCommand="/passive /norestart"
                  DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
    </PackageGroup>
  </Fragment>
</Wix>

我决定更改引导程序应用程序UI,以包括我的许可证,徽标和主题。这是通过将WixBalExtension作为参考来完成的。这似乎是目前拥有一个统一安装UI的最简单方法。新的引导程序列表如下。

    <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
  xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
  xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <!--Version="1.0.0.0"-->
  <Bundle Name="BootstrapperRedist"
          Version="!(bind.packageVersion.MicroSyn)"
          UpgradeCode="3f40cdd1-640d-4fe6-8edb-17a308d8f227" 
          IconSourceFile=".\MS.ico">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication
        LicenseFile=".\license.rtf"
        ThemeFile=".\RtfTheme.xml"
        LogoFile=".\MS_64x64.bmp"/>
    </BootstrapperApplicationRef>

        <Chain>
      <PackageGroupRef Id="NetFx40ClientRedist"/>
      <MsiPackage Id="MicroSyn" 
                  SourceFile="$(var.MicroSynSetupProject.TargetPath)" 
                  DisplayInternalUI="no"/>
        </Chain>
    </Bundle>
  <Fragment>
    <!-- Check for .NET 4.0 -->
    <util:RegistrySearch Root="HKLM"
                         Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                         Value="Version"
                         Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM"
                         Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                         Value="Version"
                         Variable="Netfx4x64FullVersion"
                         Win64="yes" />
    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full"
                  DisplayName="Microsoft .NET Framework 4.0"
                  DownloadUrl="http://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe"
                  Compressed="no"
                  Cache="yes"
                  PerMachine="yes"
                  Permanent="yes"
                  Vital="yes"
                  SourceFile=".\dotNetFx40_Full_x86_x64.exe"
                  InstallCommand="/passive /norestart"
                  DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)"/>
    </PackageGroup>
  </Fragment>
</Wix>

1 个答案:

答案 0 :(得分:0)

在MSI软件包上,您需要将属性DisplaysInternalUI设置为Yes

从文档中:

  

指定捆绑软件是否显示在msi中编写的UI   包。默认值为“否”,这意味着所有信息都将路由到   引导程序应用程序提供统一的安装   经验。如果指定“是”,则将用户界面创建到msi包中   将显示在任何引导程序应用程序界面的顶部。

http://wixtoolset.org/documentation/manual/v3/xsd/wix/msipackage.html

相关问题