简体   繁体   English

WiX 安装程序:如何在 WixUI_InstallDir 模式下隐藏/删除欢迎对话框

[英]WiX Installer: How to hide/remove the Welcome dialog in WixUI_InstallDir mode

I am trying to remove the WelcomeDlg from the built-in WixUI_InstallDir dialog set.我正在尝试从内置的 WixUI_InstallDir 对话框集中删除 WelcomeDlg。

For creating the setup executable and adding prerequisites, I used the bootstrap application where in I bundles the created msi.为了创建安装程序可执行文件和添加先决条件,我使用了引导应用程序,其中捆绑了创建的 msi。 Now the issue is the bootstrap comes with its own Welcome dialog and the embedded msi also shows its own dialog box.现在的问题是引导程序带有自己的欢迎对话框,并且嵌入式 msi 也显示了自己的对话框。 In order to get rid of the msi welcome dialog, I have removed the Publish statemnts related to Welcome dlg from the custom WixUI_InstallDir.wxs.为了摆脱 msi 欢迎对话框,我从自定义 WixUI_InstallDir.wxs 中删除了与 Welcome dlg 相关的 Publish statemnts。 But I am not able to get hide the welcome dialog.但我无法隐藏欢迎对话框。

Is there any way to get rid of the msi welcome dialog?有什么办法可以摆脱 msi 欢迎对话框?

Recently I also faced similar kind of situation where I need to exclude showing WelcomeDlg.最近我也遇到了类似的情况,我需要排除显示 WelcomeDlg。 Our idea was to create a custom license agreement dialog as the first dialog of the UI.我们的想法是创建一个自定义许可协议对话框作为 UI 的第一个对话框。

In order to achieve that behavior, following changes have been made.为了实现该行为,进行了以下更改。

  • Created a new wxs dialog with id "AdvancedWelcomeEulaDlgEx" which shows the EULA, checkbox to accept and Next button.创建了一个 ID 为“AdvancedWelcomeEulaDlgEx”的新 wxs 对话框,其中显示了 EULA、接受复选框和下一步按钮。
  • In this dialog's InstallUISequence, added the following line.在此对话框的 InstallUISequence 中,添加了以下行。

     <InstallUISequence> <Show Dialog="AdvancedWelcomeEulaDlgEx" Before="ProgressDlg">NOT Installed</Show> </InstallUISequence>
  • Suppress the WelcomeDlg from showing.禁止显示 WelcomeDlg。 We used an approach like below in main UI fragment (Condition ensures that it won't show in normal case; In our case Installed and Patch case never happens as it is the way it handled)我们在主 UI 片段中使用了如下方法(条件确保它不会在正常情况下显示;在我们的情况下,安装和补丁情况永远不会发生,因为它是处理方式)

     <InstallUISequence> <Show Dialog="WelcomeDlg" Before="AdvancedWelcomeEulaDlgEx" >Installed AND PATCH</Show> </InstallUISequence>

You can check out this link which explains a similar kind of approach.您可以查看此链接,该链接解释了类似的方法。

Basically the idea is to suppress the Welcome dialog and use the next dialog or custom dialog as initial one.基本上这个想法是抑制欢迎对话框并使用下一个对话框或自定义对话框作为初始对话框。 Also, the Publish events of Next and other dialog's events should be rewired accordingly.此外,Next 的 Publish 事件和其他对话框的事件应该相应地重新连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM