WiX: A gentle introduction

Currently I'm doing work using the WiX toolset.  There doesn't seem to be a lot of documentation around the web, so I thought I post my various travails in getting it to do what I want.  But first an introduction to it and some links to useful resources:

What is WiX?

WiX stands for Windows Installer XML (don't ask me why they use a small i).  It was the first open source project released by Microsoft.  The main site is at http://wix.sourceforge.net/ and to quote from that:

The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code.

So it's basically an open source way of building MSI files.

What's an MSI file?

MSI stands for Microsoft Installer (they used a big i this time), but the question really isn't as silly as you may think.  You see, an MSI file is not a program.  That really is worth repeating.  An MSI file is not an executable, it is a database.  It has tables with particular schemas (as well as your own custom tables) and Windows Installer uses the information in these tables to drive the installation of an application.  The list of MSI tables can be found at http://msdn.microsoft.com/library/en-us/msi/setup/database_tables.asp and if you're very interested you can download the Windows Platform SDK, get a tool called Orca  (part of the Windows Installer SDK).  This allows you to view and edit the contents of any MSI file and it looks like this:

 orca

It's worth stressing that this database includes all the dialog windows that drive the installation process, the files for the actual installation, instructions on what to put where and many other things. 

So what does WiX do then?

In a nutshell, WiX converts XML files into MSI databases.

So the XML must be quite complicated then ...

Well I don't find it very intuitive.  Things are getting easier as the WiX toolset matures (version 3.0 includes some quite nifty Visual Studio integration, for example).  There is also the WixEdit project on Sourceforge, which offers GUI screens for editing the WiX XML file - I discovered this a bit too late to use it for my current work, but it looks worthwhile.

Where can I find more information?

Try the following:

November 10 2006
blog comments powered by Disqus