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?
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?
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>
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:
Download the WiX 3.11 source, which you can download here at the bottom of the page.
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.
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">
Modify your bootstrapper definition to something like this:
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl=""
ThemeFile="HyperlinkTheme.xml"
LocalizationFile="HyperlinkTheme.wxl"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
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:
I personally would change the theme more so it doesn't look so awkward with all of that blank space.