58
votes

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?

2
@Petter, it is - it's about how to do this in WiX.Yan Sklyarenko
Should not have been closed as off topic. WiX is a "software tool commonly used by programmers". There are 3,438 questions tagged [wix] on SO.Tom Blodget
@All: I think creating installer of the application is a part of software development lifecycle. Unfortunately, it is closed as off topic. Still I expect help on above query.Monika
I have voted to reopen.Peter Mortensen
This should be in an answer, but as it's been 5 days and this still isn't reopened, the wix documentation describes how to do what you are asking with Burn.Dave Andersen

2 Answers

59
votes

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

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.