Wix:在使用引导程序时显示 WixUI_minimal [英] Wix: getting WixUI_minimal to show when bootstrapper is used

查看:26
本文介绍了Wix:在使用引导程序时显示 WixUI_minimal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm somewhat new to Wix. I created a bootstrapper to check and install .NET version 4 framework if it doesn't exist. In my msi package, I'm using WixUI_minimal installer interface. When I run the bootstrapper.exe, the standard bootstrapper UI shows instead of the WixUI_minimal. Is there a way to have WixUI_minimal present and have .NET framework install in the background without showing the bootstrapper UI? What options do I have here? Any tips would be appreciated. Thanks.

<?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 的最简单方法.新的引导程序列表如下.

I decided to change the bootstrapper application UI to include my license, a logo and a theme. This was done by including the WixBalExtension as a reference. This seems like the simplest way to go for the moment in having one unified install UI. The new bootstrapper listing is below.

    <?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>

推荐答案

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

On your MSI package you would need to set the attribute DisplaysInternalUI to Yes.

来自文档:

指定包是否将显示编写到 msi 中的 UI包裹.默认值为no",这意味着所有信息都路由到bootstrapper 应用程序提供统一安装经验.如果指定了是",则创作到 msi 包中的 UI将显示在任何引导程序应用程序 UI 的顶部.

Specifies whether the bundle will show the UI authored into the msi package. The default is "no" which means all information is routed to the bootstrapper application to provide a unified installation experience. If "yes" is specified the UI authored into the msi package will be displayed on top of any bootstrapper application UI.

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

这篇关于Wix:在使用引导程序时显示 WixUI_minimal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆