O’Reilly Net on Getting Started with WiX.


A couple weeks ago I saw Mike Gunderloy’s article about getting started with the Windows Installer XML (WiX) toolset. It was a pretty decent introduction to WiX. However, I disagreed with a couple items in the article that I’d like to discuss.


First, near the beginning the article there is a sentence that says Component GUIDs “must be unique across all packages, regardless of product.” Unless I’m misinterpreting that sentence, that statement is incorrect according to the Component Rules. The Component Rules state that a Component’s contents cannot change once the package is released. In other words, the Resource(s) contained by a Component must always be packaged in the same Component in the same way. Since the Windows Installer identifies Components by their GUID, a Component’s GUID must remain the same across all packages that contain the same Resources.


Second, the end of the article provides some advice on how to build more complex setup packages. The article mentions that you could use Access or Excel (or some other data store) to store the data for your MSI package then use some sort of export mechanism to generate the WiX source file for your product. While this is true, there is a far more powerful way to create complex setup packages using the WiX toolset. I would suggest breaking your .wxs source file into fragments and let the linker tie your symbols and references back into a cohesive product. See my previous blog entry for more details about symbols and references.


Finally, it took me too long to get this blog entry posted. It literally took me two weeks to get the blog entry about sections, symbols, and references in the WiX toolset written and this entry was blocked behind that effort. Therefore, in and effort to get more information posted, I am now trying to reduce the amount of information per blog entry and post more often. We’ll see if that works better. Comments with constructive feedback and/or suggestions are always welcome.

Comments (2)

  1. The first problem is just extremely poor wording in the article; sorry about that. Perhaps a better (and simpler) way to say it would be to say that a component must always have the same Component GUID in every package where it is used, but that no two components can have the same Component GUID. I knew that, even if I didn’t manage to say it.

    On the second piece – it seems to me that breaking up the package into multiple source fragments pushes the problem back one level, but doesn’t necessarily solve it. On a large team, I wouldn’t expect everyone to be able to author the source fragments. So wouldn’t it make sense to then put one more tool into the chain, something with a friendly interface that could spit out the source fragments as needed? I could see doing that with Access/Excel, among other things.

    Finally, there’s another level of complexity that I’d love to have you dig into for us all: building more than one MSI from a single WiX source by using the preprocessor.

  2. Imagine a blog entry where I go into the details of how I believe setup build processes should work.