63

I have created a WiX Bootstrapper project. When the installation runs, it presents a license agreement.

I want to create a bootstrapper without this step as I don't want it to show any license agreement. Is it possible to do it? If yes, how?

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
Monika
  • 669
  • 1
  • 6
  • 6

2 Answers2

62

Assuming that you are using the WiX Standard Bootstrapper Application, your current BootstrapperApplicationRef might look like this:

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />

WixStandardBootstrapperApplication has three variants as explained in the docs. HyperlinkLicense is the simplest. It has a license link on the welcome page instead of a license page. It allows you to specify an empty URL for the license, in which case it won't display the link. For example,

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
  <bal:WixStandardBootstrapperApplication 
    LicenseUrl=""
    xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" />
</BootstrapperApplicationRef>
Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
  • 6
    Just as a minor note for others that may come along, the logo resolution in the HyperLinkLicense needs to be about 64x64. Bigger than that, and it will only display the top left hand corner of the image. – Seidleroni Feb 02 '16 at 21:11
33

I used a custom theme to get rid of the license agreement step. You can see a brief overview of how to do that here.

Steps to take:

  1. Download the WiX 3.11 source, which you can download here at the bottom of the page.

  2. Extract it to a folder and add HyperlinkTheme.xml and HyperlinkTheme.wxl to your bootstrapper project. The files can be found at \src\ext\BalExtension\wixstdba\Resources relative to where they were extracted.

  3. Add the BalExtension namespace definition to the Wix element in your bundle file:

    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    
  4. Modify your bootstrapper definition to something like this:

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
        <bal:WixStandardBootstrapperApplication
            LicenseUrl=""
            ThemeFile="HyperlinkTheme.xml"
            LocalizationFile="HyperlinkTheme.wxl"
            SuppressOptionsUI="yes" />
    </BootstrapperApplicationRef>
    
  5. Now open the theme file and change the page with the Name attribute set to Install and comment out or remove the checkbox and hyperlink:

    <Page Name="Install">
        <!--<Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
        <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>-->
        <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
        <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
        <Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
    </Page>
    

After doing that your bootstrapper should now look like: Bootstrapper without the license agreement.

I personally would change the theme more so it doesn't look so awkward with all of that blank space.

Joel McBeth
  • 1,278
  • 16
  • 21
  • 6
    this is really awesome..btw the themes are available here too, C:\Program Files (x86)\WiX Toolset v3.10\SDK\themes – vinayan Aug 10 '16 at 07:31
  • It seems "xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"" should be added after "SuppressOptionsUI="yes"". – Mohsen May 11 '18 at 08:59
  • 4
    "To view a theme file without having to build a bundle, you can use the ThmViewer.exe which is located in %WIX%\bin\." I found this super useful to see UI changes without rebuilding the bundle. From the [documentation link](https://wixtoolset.org/documentation/manual/v3/bundle/wixstdba/wixstdba_customize.html) in the answer. – Felix May 23 '19 at 21:23