我想使用WixUI_Minimal安装程序,但我不想要许可页面。我怎么能这样做?
答案 0 :(得分:87)
我只是使用已经创建的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>
答案 1 :(得分:51)
关键是制作自定义用户界面并连接不同的页面。请参阅WixWiki
页面你想抓住WixUI minimal code,然后稍微修改一下。您不想使用WelcomeEulaDlg欢迎对话框,而是使用WelcomeDlg。调整引用,并将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" />
答案 2 :(得分:9)
解决此问题的低技术方法只是将属性LicenseAccepted
设置为1
,并将一些有用的自述文件类型信息放入许可证框中。这意味着用户无需单击该框,您无需担心创建其他对话框:)
示例:
<Property Id="LicenseAccepted" Value="1"/>
答案 3 :(得分:5)
有关最简单的最小用户界面,请参阅answer to a related question,WiX script with only Welcome and Completed screens:
答案 4 :(得分:3)
@Ran Davidovitz的答案非常好
但要小心:
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
它必须有订单=&#34; 2&#34; ,否则它无法正常工作。