Thursday, 16 April 2009

Inno Setup - a simple, free setup program

Another first when developing my C# application was considering how I was going to publish it.

Although there is a Publish tool in Visual Studio/C# and it seemed simple (with lots of extras - some of which I knew I would have to read up on) there was one issue I seemed to find hard to get around and much Googling seemed to show that other people were saying the same thing.

Inclusion of .NET download feature

Yes, how do you include this. There was talk about using Visual Studio (2008) Setup and Depolyment Templates - I followed one or two tutorials and soon gave up when I didn't seem to have any idea of where you could (or how you could) add the ability for the system not only to download the required .NET Framework but to check the users system to see if existed and if so then to bypass the download.

Several hours of searching online and reading peoples comments and thinking I was almost there I came to the conclusion that there seemed to be one Setup application that was a front runner when I found details (code) that would allow the users system to be checked before consdiering whether the .NET download was required.

Inno Setup

Inno Setup (Jordan Russell's Software) was the one that appeared to be the answer. Not only was it getting sufficient praise/recommendation but it appeared to be both not overly difficult to program but also because of its program nature had the ability to offer good download conditioning.

I had soon installed Inno Setup Compiler (v 5.2.3) and was beginning my education in its way of setting up the process of the Setup program through it's INI structure.

The numerous examples and those found online plus the help documentation allowed me to get started and soon I had created a Setup app that allowed for the checking and then (if required) the downloading/installing of .NET 3.5 framework.

Then I added to this the need to check for and install the following
  • SQL Server Compact Edition 3.5 SP1 (file: SSCERuntime-ENU-x86.msi)
  • Report Viewer 2008 SP1 (file: reportviewer.exe)
  • MS Office 2003 Primary Interop Assemblies (file: O2003PIA.MSI)
With these last three I couldn't figure out from the MS website whether they should be downloaded (which is stated by them and other people in relation to the .NET framework) and as such I have included them as files which are installed (again if certain Registry enteries are missing - the latter one I had to work out as I couldn't find it in my searches on the internet).

For a FREE piece of software and with what was available (examples and other peoples work plus the supporting documentation) the Inno Setup application is just perfect to allow me to get started 'delivering' my first proper application.

The ISS file.


Richard
Visionscape

2 comments:

  1. Thanks Richard, this post was extremely helpful.

    ReplyDelete
  2. I also use Inno Setup for creating installers for my packages due to some problems with custom actions in MSI.

    That might be interesting for Inno Setup users who works in Visual Studio: Visual & Installer - Visual Studio extension for creating installers in NSIS and Inno Setup (both are free and open source): http://visualstudiogallery.msdn.microsoft.com/5e57fe9a-ae5d-4740-a1c3-7a8e278e105b

    ReplyDelete