【发布时间】:2010-10-10 11:13:55
【问题描述】:
我想使用 WixUI_Minimal 安装程序,但我不想要许可证页面。我该怎么做?
【问题讨论】:
标签: wix installation wix3
我想使用 WixUI_Minimal 安装程序,但我不想要许可证页面。我该怎么做?
【问题讨论】:
标签: wix installation wix3
关键是制作自定义 UI 并连接不同的页面。请参阅WixWiki上的页面
您想要获取WixUI minimal code,并对其进行一些修改。您想使用 WelcomeDlg,而不是 WelcomeEulaDlg 欢迎对话框。调整引用,并将 WelcomeDlg 上的 Next 按钮连接到堆栈中的下一个对话框,即 PrepareDlg。
完整代码:
<UI Id="WixUI_Minimal">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<!-- This is the welcome dialog you specified-->
<DialogRef Id="WelcomeDlg" />
<!-- Hook the new welcome dialog to the next one in the stack-->
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<Property Id="ARPNOMODIFY" Value="1" />
</UI>
<UIRef Id="WixUI_Common" />
【讨论】:
我会简单地使用一个已创建的 WiX UI 并覆盖序列(使其更高,以便覆盖之前的设置):
<Product>
...
<UI>
<UIRef Id="WixUI_InstallDir" />
<!-- Skip license dialog -->
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
</UI>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
...
</Product>
【讨论】:
解决此问题的低技术方法是将属性 LicenseAccepted 设置为 1 并将一些有用的自述文件类型信息放入许可证框中。这意味着用户不必单击该框,您也不必担心创建额外的对话框:)
例子:
<Property Id="LicenseAccepted" Value="1"/>
【讨论】:
<Property Id="LicenseAccepted" Value="1"/>
@Ran Davidovitz 的回答很好
但要小心:
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
它必须有 Order="2",否则它不能工作。
【讨论】:
请参阅answer to a related question、WiX script with only Welcome and Completed screens,了解最简单的最小 UI:
【讨论】: