Showing posts with label WiX. Show all posts
Showing posts with label WiX. Show all posts

Wednesday, 3 October 2012

WiX Bootstrapper Application

EDIT: This code has been updated and is now available here http://wixextba.codeplex.com/.
I have been working with the new WiX bootstrapper applications and have created my own version based heavily on the standard BA.
This version has the following enhancements over the standard code:
  • Resized HyperlinkLicense and RtfLicense so they look the same as the default WiX UI – this is useful if you need to show an MSI internal UI.
  • Add welcome message to HyperlinkLicense install page.
  • Add support for Radio buttons on the option and install pages.
  • Add support for checkboxes on the install page (they are already supported on the options page).
  • Add support for second directory folder on the option page.
  • Add example HyperlinkTheme that supports a larger logo on the install page (see images below).
  • Add example textbox on the options page.
  • Added install version number to HyperlinkLicense install page.
  • Reformat the RtfLicense to have flat licence textbox.

Download

The source for this can be downloaded here. To use it add a reference to WixBalExtensionExt.dll (in the build folder) and add the following code to you bundle:
<BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.HyperlinkLicense" />
The code should build on any machine with Visual Studio 2010 and WiX 3.6 installed. The extended BA has been renamed to use Ext or Extended in place of Std or Standard but I have kept the filenames the same so it is easier to merge changes from the WiX standard BA.

Examples

See folder “Test” in the download for examples of using this BA.
image
image
image

Tuesday, 1 May 2012

Burn UI Customisations

I have written a couple of WiX burn UI customisations and thought they were worth sharing. They are both based on the standard WiX burn templates and can be easily implemented as mentioned in my previous post http://neilsleightholm.blogspot.co.uk/2012/05/wix-burn-tipstricks.html.

HyperlinkLicense

I changed this to include the following features:
  1. Resized to match standard WiX UIs.
  2. Add welcome text
  3. Display version number.
image

The relevant bits of code to do this is shown below, all other code it the same as the standard UI:

<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
    <Window Width="500" Height="390" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>


    <Page Name="Install">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2">#(loc.InstallHeader)</Text>
        <Text X="11" Y="121" Width="-11" Height="-129" FontId="3">#(loc.InstallMessage)</Text>
        <Hypertext Name="EulaHyperlink" X="11" Y="-107" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
        <Text X="11" Y="-73" Width="246" Height="17" FontId="3">#(loc.InstallVersion)</Text>
        <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="246" 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>

This also requires the addition of a few items in the HyperlinkTheme.wxl file:

  <String Id="InstallHeader">Welcome</String>
  <String Id="InstallMessage">Setup will install [WixBundleName] on your computer. Click install to continue, options to set the install directory or Close to exit.</String>
  <String Id="InstallVersion">Version [WixBundleVersion]</String>

RtfLicense

I changed this to include the following features:
  1. Resized to match standard WiX UIs.
  2. Change odd looking 3D outline to a single line.
image

The relevant bits of code to do this is shown below, all other code it the same as the standard UI:

    <Page Name="Install">
        <Text X="11" Y="80" Width="-11" Height="-70" TabStop="no" FontId="2" HexStyle="0x800000" />
        <Richedit Name="EulaRichedit" X="12" Y="81" Width="-12" Height="-71" TabStop="yes" FontId="0" />
        <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="246" 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>

WiX Burn – tips/tricks

This post outlines some of the things I have found out since working with the new Burn code, unless otherwise stated this refers to version 3.6.2830.0 or later. For my requirements I have only needed to create single file installation setups, so none of these examples will include download code. I keep the source to resources in a folder called “Resource” so in the examples below "Resource\" is a reference to this folder.

In many cases this information has been gleaned from the WiX Users mail list. If you spot any errors or can suggest improvements please let me know.

Basic Template

This is my outline framework that I have been using to create a burn project:
<?xml version="1.0" encoding="utf-8"?>

<?ifndef Version?>
<?define Version = "1.0.0.0" ?>
<?endif ?>

<Wix RequiredVersion="3.6.2830.0" xmlns="http://schemas.microsoft.com/wix/2006/wi
"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="My Application" Version="$(var.Version)" Manufacturer="ACME" UpgradeCode="PUT-GUID-HERE
"
    HelpUrl="http://www.nowhere.com
"
    Copyright="Copyright© 2012, ACME" IconSourceFile="Resource\Setup.ico
"
    SplashScreenSourceFile="Resource\SplashScreen.bmp
"
    AboutUrl="http://www.nowhere.com
"
    Condition="((VersionNT >= v5.1) AND (ServicePackLevel >= 3)) OR ((VersionNT >= v5.2) AND (ServicePackLevel >= 2)) OR (VersionNT >= v6.0)">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" />
    <WixVariable Id="WixStdbaLicenseUrl" Value="" />
    <WixVariable Id="WixStdbaLogo" Value="Resource\logoSmall.png" />
    <Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]ACME\My App" />

    <Chain>
      <PackageGroupRef Id="Netfx4Full" />

      <RollbackBoundary />
     
      <MsiPackage
        Id="Setup
"
        Compressed="yes
"
        SourceFile="$(var.Setup.TargetPath)
"
        Vital="yes">
        <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
      </MsiPackage>
    </Chain>
  </Bundle>
</Wix
>

Notes:

  • This template reference the .Net 4 framework, for this I just copied the WiX source but set ExePackage/@Compresses=”yes” to embed the framework in my installation.
  • The Bundle/@Condition sets the install to only run on Windows XP SP3, Windows 2003 SP2 or later.
  • The WixStdbaLicenseUrl is set to an empty string to hide the license URL hyperlink as it is not require for my installation.
  • By referencing my WiX MSI setup project in the burn project I can reference the MSI using the syntax SourceFile="$(var.Setup.TargetPath)" where Setup is the name of my project.
  • The preprocessor variable for the version allows me to set the version from my build environment.

No License UI

To create an installation without a license URL link use the following:
       <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" /> 
    <WixVariable Id="WixStdbaLicenseUrl" Value="" />

Hyperlink to local License file

If you want to have a link to local license file as part of your installation save the license file as an html document and then reference it as follows:
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
      <Payload SourceFile="Resource\License.htm" />
    </BootstrapperApplicationRef>
    <WixVariable Id="WixStdbaLicenseUrl" Value="License.htm" />

This embeds the file license.htm file within the bundle and extracts it when the installation is run, if the user clicks the hyperlink then the file is loaded in the default browser.

RichText box license dialog

To create an installation with the license displayed in a richtext control use the following:
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <WixVariable Id="WixStdbaLicenseRtf" Value="Resource\License.rtf" />

Custom UI

If you want to customise the standard UIs copy them from the WiX source and reference them like this:
    <WixVariable Id="WixStdbaThemeXml" Value="Resource\HyperlinkTheme.xml" />
    <WixVariable Id="WixStdbaThemeWxl" Value="Resource\HyperlinkTheme.wxl" />

.Net Framework 3.5 SP1 Install

To install the .Net Framework v3.5 SP1 I use this:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Fragment>
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" Value="Version" Variable="Netfx35Version" />

    <PackageGroup Id="Netfx35">
      <ExePackage Id="Netfx35
"
        Cache="no
"
        Compressed="yes
"
        PerMachine="yes
"
        Permanent="yes
"
        Vital="yes
"
        Name="Redist\dotnetfx35.exe
"
        SourceFile="..\Redist\dotnetfx35.exe
"
        InstallCommand="/q /norestart /lang:ENU
"
        RepairCommand="/q /norestart /lang:ENU
"
        UninstallCommand="/q /norestart /lang:ENU
"
        InstallCondition="NOT Netfx35Version OR (Netfx35Version &lt; v3.5.30729.1)" 
        DetectCondition="Netfx35Version AND (Netfx35Version &gt;= v3.5.30729.1)">
        <ExitCode Value ="3010" Behavior="forceReboot" />
      </ExePackage>
    </PackageGroup>
  </Fragment>
</Wix
>

Signing a package

This is the approach I use (http://wix.sourceforge.net/manual-wix3/insignia.htm):

  1. insignia -ib Setup.exe -o engine.exe
  2. signtool engine.exe (extra parameters excluded for simplicity)
  3. insignia -ab engine.exe Setup.exe -o Setup.exe
  4. signtool Setup.exe

You can also use modify the wixproj to override the SignBundleEngine and SignBundle targets (sample copied from this thread http://sourceforge.net/mailarchive/message.php?msg_id=29179087):

<Target Name="SignBundleEngine">
  <Exec Command="&quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe&quot; sign /f privatekey.pfx /p mypassword /t http://timestamp.comodoca.com/authenticode &quot;@(SignBundleEngine)&quot;" />
</Target>
<Target Name="SignBundle" >
  <Exec Command="&quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe&quot; sign /f privatekey.pfx /p mypassword /t http://timestamp.comodoca.com/authenticode &quot;@(SignBundle)&quot;" />
</Target>

I found this problematic because:

  1. My certificate is not in the certificate store so I have to use signtool (as above).
  2. Signtool is not in the path or referenced via an environment variable so you have to know the path to the location of the Platform SDK you have installed and hard code it.
  3. You signing password is hard coded in the wixproj file.

Edit 07/05/2012: ARPSYSTEMCOMPONENT not required as this supplied by burn.

Tuesday, 29 June 2010

WiX Reg File Heat Extension

WiX v2 had the tallow tool which was able to harvest a WiX fragment from a file exported from the registry (reg file). WiX v3’s replacement for this tool, Heat, lost this functionality. The code presented here adds this back as an extension to Heat. It also gives an example of how to write a custom heat extension.

You can download v0.90 of the extension from here and the source here. The extension has been built against the WiX v3.0 assemblies but works with Heat from both v3.0 and v3.5.

Using the extension

To create a basic fragment run:
        heat regfile filename.reg –ext Wix.RegFileHeatExtension.dll –out regfile.wxs

To create a more useful fragment run:
        heat regfile filename.reg –ext Wix.RegFileHeatExtension.dll –out regfile.wxs -gg -g1 -indent 2 -cg compGroup
This creates a fragment that can be referenced via the “compGroup” ComponentGroupRef/@Id element. It will also have automatically generated guids, for more information on the command line see the Heat documentation.

It should be noted that due to limitations in Windows Installer the following registry keys are not harvested by this extension:

  • REG_NONE(0), REG_LINK(6), REG_RESOURCE_LIST(8), REG_FULL_RESOURCE_DESCRIPTOR(9), REG_RESOURCE_REQUIREMENTS_LIST(a), REG_QWORD(b).
  • These will all start hex(n) in the reg file where “n” is the number/letter in brackets above.

I am hoping to get this functionality added to the WiX v3.5 core Heat command.

I hope you find this useful, if you find any problems with harvesting registry files please let me know.

Edit 04/08/10: Update to support WiX 3.0 properly.

Edit 16/12/10: This feature is now built in to WiX 3.5, see help file for details.

Tuesday, 6 January 2009

WiX Script for Major Upgrades

On the WiX mailing list recently there have been several requests for information about upgrades, this post presents a very basic script that has all the elements necessary to handle a major upgrade.

<?xml version="1.0" encoding="UTF-8"?>
<!--
Simple WiX template - This example installs a file in to a directory.
-->

<!-- This is application version number, update for each release -->
<?define Version = "1.0.0" ?>
<?define UpgradeCode = "2CFB7959-56C1-4968-94DB-A8FA212B0FA2" ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Simple WiX template $(var.Version)" Language="1033"
Version="$(var.Version)" Manufacturer="ACME Corporation"
UpgradeCode="$(var.UpgradeCode)">
<Package Description="Simple WiX template Installation" InstallerVersion="200" Compressed="yes" />

<Condition Message="A later version of [ProductName] is already installed.">NOT NEWERVERSIONDETECTED</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLDIR" />
</Directory>

<Feature Id="DefaultFeature" Level="1" ConfigurableDirectory="TARGETDIR">
<ComponentGroupRef Id="Test" />
</Feature>

<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
<UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)"
IncludeMinimum="yes" IncludeMaximum="no"
Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>

<Media Id="1" Cabinet="contents.cab" EmbedCab="yes" />

<UIRef Id="WixUI_ErrorProgressText" />

<InstallExecuteSequence>
<FindRelatedProducts Before="LaunchConditions" />
<RemoveExistingProducts After="InstallValidate" />
</InstallExecuteSequence>

<InstallUISequence>
<FindRelatedProducts Before="LaunchConditions" />
</InstallUISequence>
</Product>
</Wix>

For information on the FindRelatedProducts scheduling see here: LaunchConditions, FindRelatedProducts and Downgrades.

Useful links:
Patching and Upgrades
Paying for upgrades

LaunchConditions, FindRelatedProducts and Downgrades

Quite a long time ago I had a problem with my WiX installs when tried to detect that a newer version was installed (Upgrade code failing for silent installs). I thought the solution was to use a custom action to detect the newer version but I have finally realised what the problem was.

To recap: my install worked fine if it was running with a UI but if I ran it silently so that the InstallUISequence sequence didn't run the newer version launch condition wasn't run. This is the code I had:

<!-- Upgrade settings -->
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
<UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)"
IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
</Upgrade>

<Condition Message="A later version of [ProductName] is already installed.">NOT NEWERVERSIONDETECTED</Condition>

This worked with a UI sequence because the default sequence for LaunchConditions is 100 and FindRelatedProducts is 200. From this it is clear that the launch condition won't trigger until FindRelatedProducts has run and when there is a UI sequence the order would be LaunchConditions, FindRelatedProducts then LaunchConditions again in the execute sequence and on this second run it would trigger the launch condition. If running silently only LaunchConditions is followed by FindRelatedProducts and hence the launch condition will never trigger.

So the solution is quite simple, ensure FindRelatedProducts runs before LaunchConditions e.g.:

<InstallExecuteSequence>
<FindRelatedProducts Before="LaunchConditions" />
</InstallExecuteSequence>
<InstallUISequence>
<FindRelatedProducts Before="LaunchConditions" />
</InstallUISequence>

Edit 02/03/09: As of WiX version 3.0.5027.0 the default is for FindRelatedProducts to run before LaunchConditions so this code is not required.

Wednesday, 22 October 2008

How To Create a WiX build machine

After quite a bit of struggling to build WiX I have finally succeeded, so I thought I would share the process. The WiX help file and the make.bat file outline what is required but it misses a lot of the detail, in particular there are quite a few files that are not in the WiX source zip file but they are in CVS.

Update: I have revised this following recent changes to WiX, this now applies to WiX v3.0.4707.0 or later.

These notes should be read in conjunction with the WiX help file topic "Building WiX".

  1. Operating system: Windows 2008 Standard (Full Installation), installed with default options in a Virtual Machine.
    - I chose Windows 2008 but the following instructions should also apply to other OS's.
    - There is quite a lot to install and so I setup a 32Gb drive, the OS and all the tools took up about 20Gb of disk space, to build the source you will need about 2Gb.
  2. .Net Framework 3.5 SP1
    - This is required to build WiX but only .Net Framework 2.0 is required to run WiX.
  3. NAnt (build 2008-02-10-0.86 or later) with the modification to the SDK path shown in the WiX help file.
  4. Sandcastle May 2008 Release (Version 2.4.10520) and Sandcastle Help File Builder 1.7.0.0. The DTF help builder looks for them in an "external" directory parallel to the WiX "src" directory:
    - Sandcastle: "external\Sandcastle"
    - Sandcastle Help File Builder: "external\SandcastleBuilder"
    NOTE: Don't get Sandcastle Help File Builder v1.8.0.0 or newer as they've removed the console version that DTF uses.
  5. Visual Studio 2005 plus Service Pack 1 (SP1 isn't required but I thought it made sense).
    NOTE: It is necessary to install "C++ | x64 Compilers and Tools" if you want to build the Visual Studio 2005 version of Votive even if you don't want the x64 components.
  6. Visual Studio 2008 plus Service Pack 1 (SP1 isn't required but I thought it made sense).
  7. Visual Studio 2005 SDK Version 4.0 (February 2007) - http://www.microsoft.com/downloads/details.aspx?FamilyID=51A5C65B-C020-4E08-8AC0-3EB9C06996F4&displaylang=en.
  8. Visual Studio 2008 SDK Version 1.0 - http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&displaylang=en
  9. Optional - Microsoft HTML Help 1.4 SDK
    - I didn't install this as it is not required if you have installed all the previous items (check for "C:\Program Files\HTML Help Workshop").
  10. Optional - Windows SDK for Windows Server 2008 and .NET Framework 3.5
    - I only installed the "Developer Tools" excluding the "Mobile Tools".
    - This is only required to build the optimized IA64 binaries (see comment below).
  11. Optional - TortoiseCVS - a version of CVS is required if you want to get the source.

Code Signing

By default when you build the WiX source it is delay signed with the Microsoft Public WiX key. This means that the code will only run on the machine that it is built on or any machine that trusts the public key. You can check this by running "sn -Vl" - if it returns "*,36e4ce08b8ecfb17" the code is trusted. If you want to trust it you can run "sn -Vr *,36e4ce08b8ecfb17".

If you want to run the code on any other machine it is necessary to create your own signing key, e.g.: "sn -k wixkey.snk". You then need to set the environment variable OFFICIAL_WIX_BUILD to the path to this file, e.g.: "set OFFICIAL_WIX_BUILD=<path>\wixkey.snk". See "Helper batch file" below.

If you want to build Votive you also need to modify the sconce project to allow it to trust your key as follows:
1. Extract the public key from your key with "sn -p wixkey.snk wixkeypublic.snk"
2. Run "sn -tp wixkeypublic.snk" this will display the public key (the long string of bytes is the one you want, the key is displayed on several lines, remove the line breaks from the public keybefore you use it)
3. Now edit "src\Votive\sconce\Properties\AssemblyInfo.cs" and add your key to the ones that are already there, e.g.: 
              [assembly: InternalsVisibleTo("votive2005, PublicKey=YOUR_KEY_HERE")]
              [assembly: InternalsVisibleTo("votive2008, PublicKey=YOUR_KEY_HERE")]

WiX Source

  1. Download and extract the WiX source zip file or download from CVS. (I prefer to use the source zip file.)
  2. If you are building from the source zip file you will need the following files from CVS as they are not in the zip file (or you may already have them on your machine in one of the Visual Studio or SDK folders).

    Files:
    "src\pyro\mspatchc.dll"
    "src\light\mergemod.dll"
    "src\light\mergemod.cub"
    "src\light\darice.cub"
    "src\ext\VSExtension\wixlib\Redist\BIN_File_46001"
    "src\ext\VSExtension\wixlib\Redist\BIN_File_46002"
    "src\ext\VSExtension\wixlib\Redist\BIN_File_107602"
    "src\votive\SDK\Redist\ProjectAggregator2.msi"
    "src\votive\sdk_vs2008\tools\build\microsoft.vssdk.build.tasks.dll"

    Folders:
    "src\ext\VSExtension\wixlib\vs2005\redist"
    "src\ext\VSExtension\wixlib\vs2008\redist"
    "src\ext\DifxAppExtension\wixlib\x86"
    "src\ext\DifxAppExtension\wixlib\ia64"
    "src\ext\DifxAppExtension\wixlib\x64"
  3. On Windows 2008 and Windows Vista you will need to run the "make.bat" as an Administrator.

If all goes well you should now be able to build the full WiX release (I do this through the batch file shown below). When the build is complete the files will be copied to "build\ship\x86\wix3\3.0.xxxx.0" or "build\debug\x86\wix3\3.0.xxxx.0"

Problems

  1. Error: "src\dtf\tools\sfxca\precomp.h(32) : fatal error C1083: Cannot open type library file: 'mscorlib.tlb': No such file or directory."
    - If you run the "Visual Studio 2008 Command Prompt" you will probably find that "C:\Windows\Microsoft.NET\Framework\v2.0.50727" is not in the path, either add it manually or run "%VS90COMNTOOLS%\vsvars32.bat" (see batch file below).
  2. If you do want to install "Microsoft HTML Help 1.4 SDK" the link in the WiX help file takes you to an MSDN page but the link in there to the download is broken. The file can be downloaded from here: http://msdn.microsoft.com/en-us/library/ms669985.aspx. When you install this it is titled "HTML Help 1.3" but this is the correct install.
  3. If you get an error saying "DTFAPI.chm" cannot be found then it probably hasn't been built because the build cannot find the Sandcastle files in the "external" folder.

Accessing WiX CVS

If you have CVS installed (I use TortoiseCVS which also installs CVSNT) then the following commands will retrieve all the source:

cvs.exe -d:pserver:anonymous@wix.cvs.sourceforge.net:/cvsroot/wix login -p ""
cvs.exe -z3 -d:pserver:anonymous@wix.cvs.sourceforge.net:/cvsroot/wix co -P wix

Helper batch file

Because I am lazy and can never remember command lines I created a helper batch file to call make.bat. This batch file sets up the environment and allows you to run a few make scenarios.

@echo off
REM *****************************************************************
REM Menu to run the WiX build
REM *****************************************************************
:START

cd /d %~dp0

cls
echo.
echo *****************************************************************
echo WiX Build
echo *****************************************************************
echo.
echo 1. Full build - debug
echo 2. Incremental - debug
echo 3. Full build - ship
echo 4. Incremental - ship
echo 5. Clean all
echo.
echo x. Exit
echo.

set /p opt=Select option and press enter:

REM Check for exit
if "%opt%"=="x" goto :EOF

REM Setup environment
call "%VS90COMNTOOLS%\vsvars32.bat"
path=C:\Program Files\NAnt\bin;%path%

set OFFICIAL_WIX_BUILD=%~dp0bin\wixkey.snk

REM Run selected action
if "%opt%"=="1" Call make debug build -l make.log
if "%opt%"=="2" Call make debug inc-l make.log
if "%opt%"=="3" Call make ship build-l make.log
if "%opt%"=="4" Call make ship inc-l make.log
if "%opt%"=="5" (
Call make debug clean
Call make ship clean
)
pause
goto :START

Edit: 23/10/08 - based on feedback I have updated the instructions.
Edit: 07/11/08 - updated for WiX v3.0.4707.0.
Edit: 29/12/08 - updated to include note about VS2005.
Edit: 07/01/09 - updated to include code signing.
Edit: 09/05/09 - updated Sandcastle references.