How to build a minimal WiX installer UI without a license page?

WixInstallationWix3

Wix Problem Overview


I would like to use the WixUI_Minimal installer, but I don't want the license page. How can I do this?

Wix Solutions


Solution 1 - Wix

I would simply use one of the already created WiX UI and override the sequence (make it higher so that it will override the previous setting):

    <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>

Solution 2 - Wix

The key is to make a custom UI and hook up different pages. See the page on WixWiki

You want to grab the WixUI minimal code, and modify it a bit. Instead of the WelcomeEulaDlg welcome dialog, you want to use the WelcomeDlg. Adjust the references, and wire up the Next button on the WelcomeDlg to the next dialog in the stack, which would be the PrepareDlg.

Full Code:

  <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" />

Solution 3 - Wix

The low-tech way to get around this is simply to set the property LicenseAccepted to 1 and put some useful readme type information into the license box. This means the user doesn't have to click the box and you don't have to worry about creating an additional dialog :)

Example:

<Property Id="LicenseAccepted" Value="1"/>

Solution 4 - Wix

Solution 5 - Wix

@Ran Davidovitz 's answer is very good

but be carefully:

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

it must have Order="2",or it can't work.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAdam TegenView Question on Stackoverflow
Solution 1 - WixRan DavidovitzView Answer on Stackoverflow
Solution 2 - WixAdam TegenView Answer on Stackoverflow
Solution 3 - WixsaschabeaumontView Answer on Stackoverflow
Solution 4 - WixPauli PriceView Answer on Stackoverflow
Solution 5 - WixphoenixView Answer on Stackoverflow