Wednesday, February 08, 2006

Making Installation Programs in Windows

Many of you know that Windows Installer is the preferred method of distributing software, according to Microsoft. However, Windows Installer has the serious flaw of requiring the OS to support the Windows Installer Runtime. This can be a problem on older operating systems, such as Windows 95 Gold and Windows NT SP0-SP3. Making new versions of Windows Installer has caused a bigger problem. Windows Installer 2.0 runs only on Windows 98, Windows NT SP6a, Windows 2000, and Windows XP. Windows Installer 3.1 only runs on Windows XP SP2. Windows Installer 4.0 is currently planned to only be released to Vista because it has Vista-specific features in it, however all packages written for 4.0 automatically backport to 2.0 and 3.1.

This system is similar to the .NET framework, but that is in reverse. Anything written for .NET Framework 1.0 works on all versions, while those written for .NET Framework 1.1 only work on 1.1 and 2.0, and finally, those written for 2.0 work only on 2.0. For .NET Framework, nothing is wrong, because most libraries needed to allow programs to function can be redistributed individually, without failure or royalties. But, Windows Installer is a more difficult problem. If your program is designed to work on all Win32 systems, then you cannot use Windows Installer. You could use something such as Inno Setup or Nullsoft Scriptable Install System. Both are very good, but I believe that NSIS is much more versatile and expandable, due to its widespread support and many various plugins to make it more professional. The only thing NSIS is missing is Visual Studio plugins. 

At least for VS6 it would be good, since the InstallShield for VC++6 is very bad. Also, many installers that I built with that version of InstallShield do not work on XP due to the old structure of the installer. If you do not want to shell out $300+ for a good installer with universal support and still have a professional look, I recommend three things in combination: NSIS, HM NIS Edit, and ExperienceUI SDK. All three together allow you to build installers that look as good as the latest InstallShield installers, but with smaller overhead and much more flexibility. I see more good coming from open-source each day. NSIS is currently at 2.14 release, HM NIS Edit is at 2.0.3, and ExperienceUI SDK is at 1.1 release. The major advances in all three make things easier for the lower budgeted programmers to make nice installers for their projects. 

I think that Inno Setup should get its fair end of praise. Inno Setup is designed to be very similar in style to InstallShield, and does a good job of it. I am not sure if NSIS has a silent mode, but Inno Setup's ability to go silent install is very useful for automated runtime installs, making it as good as an automated Windows Installer installation. Inno Setup already has 64-bit installations, while most others do not yet have this capability. 

InstallShield has one advantage that would make someone who needs this feature to shell out for it: The ability to make cross-platform installers. InstallShield can make RPMs for Linux apps and binary installers for Windows, MSI files for Windows Installer, and more. That would be the only reason I would shell out for it, if I had a program developed cross platform and need easy installer development. However, recently I came across another installer: InstallerBuilder Enterprise... This version does the one thing that would have tied me to InstallShield, albeit I really do not have anything of the sort...