Search code examples
installationwixwindows-installer

Removing EULA from WixUI_FeatureTree


I'm using the WixUI_FeatureTree for an installer, where I'm trying to remove the EULA screen.

To do this I used the following:

<UI>
  <UIRef Id="WixUI_FeatureTree" />
   <Publish Dialog="WelcomeDlg"
      Control="Next"
      Event="NewDialog"
      Value="CustomizeDlg">1</Publish>

    <Publish Dialog="CustomizeDlg"
      Control="Back"
      Event="NewDialog"
      Value="WelcomeDlg">1</Publish>
</UI>

This successfully removes the EULA when clicking next on WelcomeDlg but clicking back on CustomizeDlg shows the EULA.

When I take a look in Orca I see the following lines in the ControlEvent table:

enter image description here

If I remove the highlighted line the installer works as expected.

How do I use Wix to prevent this occurring?


Solution

  • You can do this relatively easily.

    Just copy the definition of the "WixUI_FeatureTree" UI from here (The GitHub for wix) and add it to your project as MyFeatureTreeUI.wxs or something and just rename the <UI Id="WixUI_FeatureTree"> to a new unique name, remove the line

    <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">NOT Installed</Publish>
    

    and then update your <UIRef> in your product to reference the new modified FeatureTree UI in the new wxs file you made.

    Now when you compile your installer, it should be functionally identical to the one you were creating except that line you were manually removing should no longer exist by default.

    You can also remove all mention of LicenseAgreementDlg in the UI wxs, just make sure all the dialog buttons are consistent.