Friday, February 1, 2008

Dude, where is your installer?

Summary: Don't make your application users suffer: offer them an installer.

Last year, Jeff Atwood wrote an article, in which he mentioned a hassle of installing applications, which do not have installers. After describing the manual steps it takes to prepare such application for its first run, Jeff concluded:
"That's a lot of tedious, error-prone steps I have to perform before I can run the application. [...] Is this really what we want to subject our users to?"
Judging by the growing number of applications, which come without installers, the answer to Jeff's question is: "Absolutely!" And not only do we (programmers) want to subject our users to these tedious, error-prone steps, we somehow managed to make them believe that this is a good thing. Read what CyberNet's Ryan wrote about an application called Pitaschio:
"[Pitaschio] caught my attention not only because it was freeware, but also because it didn’t require any installation. Those two ingredients are pretty important when it comes to making a good first impression on me."
Now, Ryan, wait a minute... It didn't require any installation? Are you sure?

With the exception of portable programs (such as Portable Apps intended to run from USB drives), any application requires some form of installation. Installation can be manual (extracting files from a ZIP file, copying them to folders, creating shortcuts) or it can be done with the help of a setup program. Whenever someone claims that an application does not require any installation, he (she) probably means that the application does not have an installer and must be set up manually. Why this is considered a good thing is beyond me because it normally takes more effort to install a program manually.

Let's compare the steps it takes to install a hypothetical program consisting of a single executable file with and without an installer.

Option 1: Installation steps (with installer)
  1. Download the ZIP file.
  2. Extract installer file(s) from the ZIP file (to a temporary folder) and launch the setup program (good installers do this in one step).
  3. Once the setup program starts, click the Next button to select the default options (for the application folder, and so on) until setup completes (most installations can be done in three clicks or less without lots of thinking).
  4. (Optional) Delete setup file(s) from the temporary folder (again, good installers do this automatically).
  5. Delete the ZIP file.
The key point here is that the user is not forced to think and can just go: click, click, click (the mouse), or hit, hit, hit (the Enter button). Here are the steps, which I often perform to install a program manually.

Option 2: Installation steps (without installer)
  1. Download the ZIP file.
  2. Extract the application file from the ZIP file to... Hmm, where should it go? (Thinking...) I guess, I'll save it under the Program Files folder.
  3. Open Windows Explorer (click, click to start Windows Explorer). Locate the Program Files folder (click, click, click, more clicks to navigate to the Program Files folder).
  4. Okay, I'm in the Program Files folder, but how do I name a folder for the new app? (Thinking...) I guess, I'll name it after the application executable. Select File-New-Folder from the menu, enter the name of the new folder, hit Enter.
  5. Extract the application executable to the newly created folder.
  6. Switch back to the application folder in Windows Explorer and create a shortcut (right-click the executable, select Create Shortcut from the menu, click F2 to rename the shortcut, enter a more user-friendly name, hit Enter).
  7. Create a new program folder under the Start menu (click, click, click, more clicks to navigate to the Programs folder under the Start menu, select File-New-Folder, enter the name of the new folder, hit Enter).
  8. Copy the application shortcut to its program folder under the start menu.
  9. (Optional) To auto-start the program, copy its shortcut to the Startup folder; otherwise, copy the shortcut to the Quick Launch menu (again a few more clicks).
  10. Delete the ZIP file.
Would someone (Ryan?) be so kind to explain what makes option 2 better than option 1, because it's not obvious.

One argument in favor of installer-free applications claims that these applications are easy to uninstall: just delete the application file(s) and it's gone. I can't agree with this argument because it attributes "clean" application behavior (the fact that the application does not use Windows registry or any other persistent storage) to lack of installer. Besides, most client programs rely on persistent storage for tasks such as storing application data and user preferences, which (according to the most recent guidelines) should not be kept in the program folder, but saved in the user's application data directory (such as AppData). This means that when uninstalling the program, I need to find and manually delete data files, as well as the program file(s) and shortcuts located in various folders (Program Files, AppData, desktop, Start menu, Startup folder, Quick Launch menu). Again, how is this easier than launching the uninstaller and letting it handle all cleanup tasks for me?

There is one valid argument in favor of installer-free programs: support for portable execution. If an application is intended to run from a portable device, such as a USB drive, it should not require an installer. However, this does not mean that the application should not provide an installer for regular (non-portable) use.

Smarter developers, such as the makers of my favorite text editor PSPad, offer users both installation options: with and without installers. I hope that one day I will see installers for other great programs, including:If you are a developer, who haven't written an installer before, you may not realize that (for simple applications) it requires very little effort. You can build a simple installer using Visual Studio's Setup and Deployment Project templates. Or use one of the following FREE tools:Lists of other installer authoring tools can be found here:If you are totally new to the world of installers, the following references will help you get started:

Build an Installer for Installer-less Programs
Deploying a Windows-based Application
How to create a Setup package by using Visual Studio .NET
Step-by-Step Process of Creating a Setup and Deployment Project
More articles...

See also:
From MSI to WiX
It's the installation, stupid
Software and Support for Setup Developers
Windows Installer resources
Installers (list of free and commercial installers)

5 comments:

  1. Hi Alek,

    Another option worth considering (at least for some WinForms and WPF applications) is: ClickOnce deployment.

    Partial quote: "...ClickOnce aims to solve three other problems with conventional deployment models: the difficulty in updating a deployed application, the impact of an application to the user's computer, and the need for administrator permissions to install applications."

    On the 2nd point, ClickOnce is designed to prevent individual installs from messing up your system configuration or creating any lasting side-effects after an uninstall.

    Also based on ClickOnce, and going even further is WPF's "XBAP" deployment. In addition to the above benefits you also get security sandboxing, so even if the app is deliberately malicious, it will be prevented from doing bad things. Of course, the sandboxing doesn't make sense for many utility programs that need to do system-level things in full trust.

    Alan Cobb

    ReplyDelete
  2. I would've liked ClickOnce deployment better had it not been so closely integrated with IE. I use Firefox as the default Web browser, so to use ClickOnce, I first need to switch the default browser to IE, run installation (upgrade), and then switch it back to Firefox. This is not as seamless as it is supposed to be.

    ReplyDelete
  3. Alek,

    I haven't tested it myself, but according to the following:
    "In VS2005, ClickOnce worked with IE, and with FireFox if the user had installed the plug-in. In VS2008, ClickOnce works with IE, FireFox, Opera, and Safari."

    Alan Cobb

    ReplyDelete
  4. Oh, nice, I'd like to try it out in VS2008. If it does what it promises, I may like it.

    ReplyDelete
  5. I like to suggest Nvin Installer is also a good Free, Open source installer.

    Know more at Nvin Installer Blog

    ReplyDelete