在安装过程中如何显示需要安装的第三版软件作为信息

问题描述

我使用wix安装程序创建了一个msi,但是要使该软件正常工作,我们需要安装另一个软件。因此,我希望用户将消息显示为对话框,以便他们知道依赖包的安装。 用户在此对话框中单击“确定”后,后台安装将继续进行

为此,我创建了一个自定义对话框,并从我的Produt.wxs中调用该对话框,但它不充当信息辐射器,而是控制安装。

显示欢迎屏幕后,如何生成信息辐射器,因此一旦用户单击“确定”,对话框就会出现,并且应该显示许可协议的下一页

Product.wxs

  <Product Id="*" Name="Mentor PC" Language="1033" Version="1.0.0.0" Manufacturer="Waygate Technologies" UpgradeCode="303D1BF2-E4C1-44A3-9BBC-85D61CE0F7B7">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="Waygate Technologies" Description="Version 1.0" Comments="(C) 2020 Technologies" Platform="x64"/>
<MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallValidate" />
<MediaTemplate EmbedCab="yes" />

<UIRef Id="SetupDialogUI" />
<Binary Id="bgPic" SourceFile="$(env.installer_icons_dir)/Technologies-dialog.png"/>

SetupDialog.wxs

 <?xml version="1.0" encoding="UTF-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
 <Fragment>
 <UI Id="SetupDialogUI">

  <Property Id="Ok">OKbtn</Property>
  <Binary Id="OKbtn" SourceFile="$(env.installer_icons_dir)/OKbtn.bmp"/>

  <Dialog Id="SetupDialog" Width="400" Height="300" Title="Waygate Technologies">

    <Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />

    <Control Id="introText"  Type="Text" X="130" Y="50" Width="350" Height="22" Transparent="yes" Text="{\TahomaHeader}Welcome to Metro App setup." />
    <Control Id="explanationText" X="130" Y="100" Nowrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="250" Height="100" Text="{\Tahomanormal}To continue with the setup click on the Install button. If you choose not to install this application,click on the Cancel button to exit." />

    <Control Id="installButton" Type="PushButton" Text="[Ok]" Height="40" Width="100" X="170" Y="250" Bitmap="yes">
      <Publish Event="EndDialog" Value="Return">1</Publish>
    </Control>

  </Dialog>

</UI>

<InstallUISequence>
  <Show Dialog="SetupDialog" Before="ExecuteAction" />
</InstallUISequence>

除了“ SetupDialog.wxs”以外,我没有任何对话框文件,它使用提供的认WIX

解决方法

如果您有从属安装要求,则需要链接安装而不是嵌入安装。 Windows安装程序的限制之一是,在任何给定时间,ExecuteSequence中只能运行一次安装。另外,您是否考虑过最终用户会静默运行安装?对话框将如何处理?

要链接安装,您需要构建一个引导程序(setup.exe)。看一下WiX Burn。专注于链接部分。