Some Technical Notes on WIX the XML Windows Installation

We decided to rework our installation package with WIX, the open source Windows Installation XML system from Microsoft.

Where are the comments?

When I downloaded and extracted the WIX Project from the web and started to examine the examples I was struck by the lack of comments. Good programmers are like those bad kids in school, they can not stop themselves from scratching little comments into their desk. But as I examined the many examples there was not one comment to be found. My first assumption that you could not enter comments into the wix files, but this is not the case. Any XML file can have comments delimited by "<!--" and "-->". I did verify that with our own project.

Good stuff on the web

During my research I found this tutorial. Which was an excellent introduction to WIX. In the first chapter it described defining and using a variable based on a file or registry entry.

Structure your Code

The method I found to break my installation into bite size chunks was to use the "<Fragment>" tag and linking to my main project with the "<Component>" ID tag.

GUIDs all around

Every component has an optional tag "GUID". I found if I omitted them the associated entry was not removed during the uninstall. The samples have Guids which are invalid, starting with "YOURGUID". At first I found this strange, why have samples that would not compile. Then it occured to me the reason for this is simple, Guids by definition are unique, duplication probably causes "undefined behavior" or simply a system crash.


The above represents the opinion of George Mallard, P.E.

Copyright 2005, KMS Systems, Inc.
Information current as of August 14, 2005