| Join | Help

September 2007 - Posts

Monday, September 03, 2007 10:53 PM

My Impression of WiX

If anyone has created an MSI installer within Visual Studio - you probably came to the same conclusion that I did: It sucks. So, our company decided to abandon using MSI installers and decided to deploy our application as a ZIP. Making MSI's manually using the MSI SDK is cumbersome, and difficult. While that worked, I felt we took the easy way out. I always thought we should have offered both. There are those that want the ZIP because they like to do things manually, they like to know what happens; but there are those that don't care - and just want it to work.

A few months ago I spoke a Richmond Code Camp 3, where I happened to catch Darrell Norton  do a presentation on WiX (Windows Installer XML). It is, in a very loose description, what XAML does for C# as WiX does to MSI Packages. It allows you to create an MSI package from a completely XML based Solution. My first question was, "How easily can I make a NAnt script that does this for me?" The answered turned out to be very simple. There are really 2 programs needed to build a WiX project: candle and light . Candle takes your XML files, and generates an XML file set. Light, works in the sense of a linker, and finally produces the MSI. Althought the application installation does nothing fancy, it is pretty cool. With the Visual Setup Project, you just handed it a project, and it put it somewhere. You couldn't easily leverage all of the MSI foundation features, which WiX lets you do. One other thing that WiX made it easy to do was cleanup during an uninstall. If a customer were to uninstall the product (Why on earth would they do that?), the program can create various other files, such as a settings file, or a logging file. Removing these can be displeasing to the customer, so we should get rid of them. I also started making my own installer dialogs to more suit the product.

So, here we have something that is easy to use, but can fully leverage the capabilities of MSI. Microsoft used WiX to make the installers for Visual Studio 2005 and Office 2007, so it is capable of handling large applications.

The Visual Studio AddIn for it is could be better, but really, all you need is notepad or an XML File Editing tool like XML Notepad or Notepad++. I really like WiX, it's concept is simple, but it is a powerful tool - and it's open source on SourceForge.

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted by Kevin Jones with no comments
Filed under: