Introduction to the Windows Installer XML Toolset
The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code.
The toolset provides both a command line environment that developers may either integrate into their oldstyle Makefile build processes or use the newer MSBuild technology from inside integrated development environments like Microsoft’s Visual Studio or SharpDevelop to build their MSI and MSM setup packages.
WiX is an open source project, originally developed by Microsoft
To summarize the features and advantages of the toolset:
- declarative approach
- unrestricted access to Windows Installer functionality
- source code instead of GUI-based assembly of information
- complete integration into application build processes
- possible integration with application development
- support for team development, both in-house and third-party
- free, open source
Microsoft itself is switching to WiX with all its major software packages. Just as an example, the setup of Microsoft Office 2007 was developed entirely with WiX.
All these will be described in the source files fed to the WiX compiler. The toolset consists of several parts and we will use two of them to compile our installation packages. Assuming we have prepared a Sample.wxs file, the command
will perform the first phase of the compilation, creating Sample.wixobj, a half-digested file (this one is still XML but its internal structure is irrelevant to us; think about it as an object file in usual compiler parlance). The second command
will turn this intermediate representation into our final package, a Sample.msi file. Much like a compiler and a linker.
Also note that WiX is not an installation environment of its own. To put it simply, it is a comfortable, XML-style way to describe your installation requirements that gets translated into Windows Installer .msi databases by its compiler and linker. In this respect, WiX is a relatively thin wrapper around Windows Installer technology.