Sunday, March 23, 2008

Installation

I've been working on my installer recently, a task I'm not fond of. In addition to installing files, I need to register a 3rd party type library (don't get me started) and edit a different 3rd party INI file. At my old company, I used Wise Installer to create installations which I found pretty easy to use. But the version I used didn't create MSI files, and for that, we had started to use InstallShield which I hated. It seemed clunky and hard to figure out.

So in keeping with my bootstrapping plan of keeping my costs as low as possible, I decided to try out a Micorosft Visual Studio's setup project since I already own Visual Studio. You can create a setup project similar to the way you create any new Visual Studio project. I can't say it was super easy to use, but with the help of some online resources, I managed to create a pretty good installation, and I think I even understand the whole "Product Code" thing now (which I had a hard time with in InstallShield).

For my purposes, I created separate dll's for editing the INI file and for registering the type library. By using Installer classes in those projects, I'm able to call the code in my dll's from my installation using custom actions. It works great.

Here are some resources I found useful when I was putting my installer together:
A Code Project step-by-step tutorial on creating a setup project
An article on simple-talk using custom actions
FAQ on Windows Installer

No comments: