77

我想使用 WixUI_Minimal 安装程序,但我不想要许可证页面。我怎样才能做到这一点?

4

5 回答 5

93

我会简单地使用一个已经创建的 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>
于 2011-02-09T17:31:14.100 回答
58

关键是制作自定义 UI 并连接不同的页面。请参阅WixWiki上的页面

您想获取WixUI 最小代码,并对其进行一些修改。您想使用 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" />
于 2009-02-27T23:21:24.327 回答
16

解决此问题的低技术方法是将属性设置LicenseAccepted1并将一些有用的自述文件类型信息放入许可证框中。这意味着用户不必单击该框,您也不必担心创建额外的对话框:)

例子:

<Property Id="LicenseAccepted" Value="1"/>
于 2009-03-02T23:23:03.313 回答
7

请参阅相关问题的答案WiX script with only Welcome and Completed 屏幕,以获得最简单的最小 UI:

  1. 欢迎Dlg
  2. 安装进度
  3. 退出对话框
于 2013-04-02T17:36:11.323 回答
4

@Ran Davidovitz 的回答非常好

但要小心:

<Publish Dialog="InstallDirDlg"
         Control="Back"
         Event="NewDialog"
         Value="WelcomeDlg"
         Order="2">1</Publish> 

它必须有Order="2",否则它不能工作。

于 2013-06-24T10:09:50.917 回答