您需要创建自己的包含单选按钮的对话窗口。这是一个很好的教程:http ://wix.tramontana.co.hu/tutorial/user-interface-revisited/a-single-dialog
这是一个极简主义的例子。这样,安装程序的 UI 将仅包含 1 个带有单选按钮和“安装”按钮的对话框:
<UI>
<Dialog Id="RbDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="RadioButtonGroupID" Type="RadioButtonGroup" X="30" Y="94" Width="305" Height="100" Property=" VARIABLETOSTORESTATE " Text="This is My Group">
<RadioButtonGroup Property="VARIABLETOSTORESTATE">
<RadioButton Value="1" X="0" Y="0" Width="200" Height="10" Text="State 1" />
<RadioButton Value="2" X="0" Y="20" Width="200" Height="10" Text="State 2" />
</RadioButtonGroup>
</Control>
<Control Id="Install" Type="PushButton" X="304" Y="243" Width="56" Height="17"
Default="yes" Text="Install">
<Publish Event="EndDialog" Value="Return" />
</Control>
</Dialog>
<InstallUISequence>
<Show Dialog="RbDlg" Before="CostInitialize" />
</InstallUISequence>
</UI>
当然,您可以在现有的 Wix 对话框集中添加此对话框。也许您已经使用例如以下方式调用了这样的 UI:
<UIRef Id="WixUI_Mondo" />
这是一个很好的介绍: http: //www.packtpub.com/article/windows-installer-xml-wix-adding-user-interface
这里有一些提示可以节省你一些时间:在上面的教程中,请注意每个对话框如何使用“下一步”和“返回”按钮调用另一个对话框:
<Publish Dialog="LicenseAgreementDlg" Control="Back"
Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Next"
Event="NewDialog" Value="CustomizeDlg">LicenseAccepted = "1"</Publish>
在您的对话框中,您还可以创建“下一步”和“返回”按钮。Ofc 最后一个对话框有一个“完成”按钮而不是“下一步”。
互联网上有很多关于如何跳过许可协议对话框的示例(例如这个)。这些是关于如何更改安装 UI 顺序的很好的基本示例。如果您能理解这些示例,那么您将有足够的知识将自定义对话框添加到安装 UI 序列中。学习难度不大,功能也很强大。祝你好运 !