Friday, June 19, 2009

Beginning Installations and Headaches

Installations have never been part of my job title but for those developers out there, few projects that we work on are ever in our "title". Around here, I've been deemed "install guy" by our group and so I've been tossed into the wonderful [/sarcasm] world of installations. My boss has been using a real old version of Wise but he appeared to like it. Naturally, I was asked to evaluate some other software technologies to see which would suit our development.

Now comes the interesting part...

After downloading some different software packages and testing them out, I decided on InstallShield version 11.5 (mind you this was back in 2005) and when I was using InstallShield, I thought it was the greatest thing ever. It supported .NET 2.0 and had some other cool features that I thought would be very handy. After making my recommendation, the company purchased our brand spankin new copy of InstallShield 11.5 for Windows. I was so excited about having a new "toy" that I started working away on an install for our product and so my headaches began...

If anyone has come from a development background and is asked to put together an installation for Windows Installer, you'll know where I'm coming from. Windows Installer put it nicely...not very easy to learn. Merge Modules, Features, Components...they all started running together so on went my OO hat. Features...that should be like our product it. Merge Modules...that should be like it. Components...that should be like...Objects?? Ok this wasn't making sense so off to wild wild web to find some tutorials or explanations.

I stumbled across some nice tutorials on MSDN to help me sort out the differences so I was back to work! Now that I understood Windows Installer terminology, I felt like I was ready to tackle our new software. Boy was I wrong!

Doing XML configuration changes in InstallShield 11.5 is horrific (actually they are horrific all the way to version 2009). Adding files, causes new components to be created (no stop that!). Dialog must write a book of conditions to determine where your dialogs go next. I remember sitting back in my chair going "when is the IDE going to help me instead of causing me more work?"

After many weeks of splitting headaches, I gave up and said the typical developer thing "let's just use XCopy for now."

Fast forward to 3 weeks ago...

I've been put back on to Installations (ugh!) so I started reading some favorite blogs of mine (Christopher Painter:, InstallSite:, etc) and I started seeing talks about this product "Wix". Hmmm...this is a new toy...let's try it out! Downloaded it, went thru the Wix tutorial ( and off I went! Created a simple setup for one of our products (no sweat!) and so I went back to tell the boss "hey a new install tool!" Of course, I show him what I had done and he was sold (he couldn't stand InstallShield either).

Fast forward to the present...

I've been working on our main product installation and guess guessed it...more headaches! First off, the documentation available for doing things in Wix is...well...sparse. There are no books on it (of course that doesn't surprise me...there weren't any for InstallShield). Secondly, it's a little difficult to debug. Now I know I sounded before like I completely dispised InstallShield (which really isn't completely true) but I am realizing that I miss some things about InstallShield (MSIDebugger to be specific). I only say this becausing combing through MSI installation logs is not exactly fast nor is it easy on the eyes.

My new issue is with Wix's XmlFile standard action. I've got it functioning just fine on beautiful and didn't require a lot of work to figure out how to use it. But here's the catch...on uninstall, the second configuration file causes the uninstall to rollback! Doh! What is it now?!?

I headed back to the wild wild web and found a great posting by gisenberg ( that stated that XmlFile has issues with uninstall and to switch to the XmlConfig action instead. This required a little bit of rewriting but luckily I was able to copy several items from the XmlFile action. Note: You must use Action and Node properties appropriately if you want this to set/update an attribute of an existing element (Action="create" and Node="value"). I hope this will be the last bit of trouble I have with this installer but I seriously doubt it.