Visual Studio 2008 installer project tips

No doubt there are entire teams of people dedicated to understanding the Microsoft Windows installer system (.msi files) but for me it is just a means to an end. I didn’t find it a particularly accessible technology so from the point of view of someone interested in deploying the output from a Visual Studio 2008 project onto end user systems, here are a couple of the gotchas I came across.

First, there is a registry key on the end user system which should record the location into which the installer deployed the output of your project (maybe the end user choose this through an install wizard). I mistakenly assumed that Microsoft’s Visual Studio installer project would automatically handle the basics like this, but no. The answer was in this recent blog post: Using a Post-Build Script to set the InstallLocation property in VS Setup Projects – the author includes a handy script which you can just drop into your project to fix this problem.

The second problem was an error message I received when installing my project:

Error 1001. Unable to get installer types in the […] assembly. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Although missing DLL dependencies and pre-requisites are already published known causes for this problem, that didn’t quite reveal the true cause in my case. The reason I experienced this error is because:

1) I had set up a custom install action in my main project assembly (to add the install folder to the system path)
2) I had redirected the primary project output to an alternative folder (rather than the default “Application folder”)

So the quick fix was to add a second project output to the installer so it now puts the DLL into my alternative folder as well as the main output folder (along with all its other DLL dependencies). Hopefully there is a neater way to do this which doesn’t clutter the end user’s system with two copies of the same file but I’m in no rush to find it because I just want to get on with some real development work rather than trying to understand VS2008 installer project limitations.

KeeFox 0.5 released

KeeFox 0.5 is ready. It is still not a finished product but in some cases you will be able to install the Firefox add-on and successfully step through the setup process. If you do that, you should see the basic functionality working fairly well (saving and loading passwords via Firefox).

I would not (and indeed do not) yet trust this software with my important passwords. I know of no way that data could be lost or exposed but it is simply not mature enough for me to guarantee that there will be no problems. So keep backups of everything and don’t let anything too sensitive near it just in case.

Go to the KeeFox website to find a link to the firefox addon and the full details of this release.

The source code is in the subversion (SVN) code repository at https://keefox.svn.sourceforge.net/svnroot/keefox/

Over the next couple of months I hope to do the following, leading to a 0.6 release which is suitable for wider testing among existing KeePass users.

  • Add all configurable options to the options panel
  • Make KeeFox understand KeePass groups
  • Provide a way to log in to websites by clicking on a password entry in a Firefox toolbar button dropdown
  • Support a wider array of login forms (maybe dynamically generated forms or forms with multiple password fields)
  • Add all other outstanding tasks to a public task tracker

I have postponed the integration with other areas of Firefox (such as the address bar or bookmarks) but still hope to achieve something in this area before the version 1.0 release. If you think you can help with this task, please