77

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

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Adam Tegen
  • 25,378
  • 33
  • 125
  • 153

5 Answers5

94

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>
Eternal21
  • 4,190
  • 2
  • 48
  • 63
Ran Davidovitz
  • 1,250
  • 9
  • 16
  • 10
    This answer would be better if it explained where to put the UI tag – Alan Jul 10 '14 at 16:06
  • 3
    @Alan I put the element into the element, that worked fine. – theDmi Aug 26 '14 at 09:56
  • @Justin The UI & UIRef stuff apparently can't be the first element under Product. I have no idea why, but it failed for me too until I had something above it. Not sure if it is the same error. – Josh Sutterfield Apr 28 '15 at 14:34
  • 1
    does not compile: *error LGHT0091: Duplicate symbol 'ControlEvent:WelcomeDlg/Next/NewDialog/VerifyReadyDlg/Installed AND PATCH' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.* ... and so forth –  Jul 21 '15 at 07:55
  • 1
    @Justin: For error code 2819 see http://stackoverflow.com/a/24439962/569302 – Jesus is Lord Apr 21 '17 at 14:19
  • For me this didn't work, as the installer /sometimes/ (dunno when) told users, to their surprise, C: was not actually a local hard disk. I copied all of the content of the Element from src/ext/UIExtension/wixlib/WixUI_InstallDir.wxs and made these adjustments there, without the "Order" attributes, which worked well. – Moritz Both Jan 31 '18 at 11:32
61

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" />
Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
Adam Tegen
  • 25,378
  • 33
  • 125
  • 153
  • Thank you, I knew what I had to do, but I didn't know what to set the Next dialog after WelcomeDlg. Where can I find what the dialog stack is? How could I have figured out that the next dialog after WelcomeDlg should be PrepareDlg? – Carlos Jun 05 '10 at 01:48
  • I have an issue with the code above and launch application that also use ExitDialog NOT WIXUI_EXITDIALOGOPTIONALCHECKBOX and NOT Installed the application didn't closed properly – se_pavel May 30 '11 at 13:35
  • Anyone try this and get "The Windows Installer XML variable !(wix.WixUICostingPopupOptOut) is unknown. Please ensure the variable is declared on the command line for light.exe"? – Martin Capodici May 25 '14 at 23:56
  • 1
    I used the code above (from 2009) and got "The Windows Installer XML variable !(wix.WixUICostingPopupOptOut) is unknown. To resolve this I got the latest source and copied the fragment \src\ext\UIExtension\wixlib\WixUI_Minimal.wxs. Then removed the and added the new DialogRef and Publish as per Adam's answer. – Martin Capodici May 26 '14 at 00:13
  • 3
    The wixwiki link is broken. – Nicolas Raoul Jul 07 '14 at 03:33
  • I am getting error:Unresolved reference to symbol 'Dialog:ErrorDlg' in section 'Product:{07CDD126-8D87-46CF-87B0-8731980619FA}'.Kindly help. – zooney Aug 26 '14 at 13:40
  • Cut, paste, BOOYA! ... +1 – sky-dev Nov 21 '14 at 23:00
  • Works like a charm - 28/7/2015 – Sudhanshu Mishra Jul 30 '15 at 03:09
  • 1
    In Wix 3.11.0 using Visual Studio, you get an error "Duplicate Symbol WixUI:WixUI_Minimal ..." To fix just find and replace WixUI_Minimal with WixUI_CustomMinimal in your above code chunk and then in your main product do a – user922020 Jan 31 '18 at 19:00
16

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"/>
Frank V
  • 25,141
  • 34
  • 106
  • 144
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
7

See the answer to a related question, WiX script with only Welcome and Completed screens, for the simplest minimal UI:

  1. WelcomeDlg
  2. Installation progress
  3. Exit Dialog
Community
  • 1
  • 1
Pauli Price
  • 4,187
  • 3
  • 34
  • 62
  • 2
    This is the answer I was looking for. All the other solutions here have downsides, and require more clicks to get through the dialogs. – Eternal21 Oct 05 '17 at 20:09
4

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

phoenix
  • 475
  • 1
  • 5
  • 14