Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a bootstrapper application without a license agreement step

Tags:

wix

wix3.7

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?

like image 805
Monika Avatar asked Jun 07 '13 07:06

Monika


Video Answer


2 Answers

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>
like image 107
Tom Blodget Avatar answered Oct 16 '22 14:10

Tom Blodget


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.

like image 33
Joel McBeth Avatar answered Oct 16 '22 15:10

Joel McBeth