How to add a bootstrapper to a WiX 3.0 Project

by JasonRShaver 16. May 2009 16:58

 To get your Visual Studio 2008 WiX install project to create one of those 'Setup.exe' bootstrapper programs that auto-downloads the correct .NET Framework and stuff, add the following to your .wixproj file:

 

    <ItemGroup>

        <BootstrapperFile Include="Microsoft.Net.Framework.3.5">

            <ProductName>Microsoft .NET Framework 3.5</ProductName>

        </BootstrapperFile>

        <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">

            <ProductName>Windows Installer 3.1</ProductName>

        </BootstrapperFile>

    </ItemGroup>

 

    <Target Name="Bootstrapper" Inputs="$(OutDir)$(TargetFileName)"

            Outputs="$(OutDir)\Setup.exe" Condition=" '$(OutputType)'=='package' ">

        <GenerateBootstrapper ApplicationName="MyProductName" ApplicationFile="$(TargetFileName)"

                              BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite"

                              OutputPath="$(OutputPath)" Culture="en-US" />

    </Target>

 

    <PropertyGroup>

        <BuildDependsOn>$(BuildDependsOn);Bootstrapper</BuildDependsOn>

    </PropertyGroup>

It does not matter where you put it in the *.wixproj file as long as it is inside the Project tag.

 

Tags:

Blog

About the author

I am a software developer working for Microsoft in Redmond, WA.  In addition, my wife and I own TTXOnline, what is likely the 3rd largest table tennis store in the US.

Month List

Page List