ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

July 23, 2010

Back To Basics - Installation Principles

I came across an old thread on StackOverflow lately where the following question was asked:

I've read a bunch of documentation on installers and haven't come across anything good that explains the underlying concepts. Most of the installer software I've come across is based on the same "database" like structure that I just don't understand at all.

All of the documentation that comes with the various products - i.e. WiX, InstallAware, Wise, InstallShield etc expect that you understand these underlying concepts [which I just don't get] in order to follow what they're talking about.

Can anyone point me in the direction of documentation that explains the concepts of software installers so that the software documentation actually makes sense?

- Bob The Builder


Bob makes a good point. Just how do you define a good install? After doing installs for 14 years, I sometimes forget that these principles aren't understood by many or really documented anywhere except perhaps in dated books like Bullet Proof Installs by Leslie Easter. It's mostly tribal knowledge. I have decided to make a short list of mostly generic recommendations that I've learned over the years.


1) Remember that your install is the very first impression the user gets of your application. If your install sucks or worse fails that will not want to use your software or your support desk will get flooded with calls. I can not understate this point. I have saved companies from the brink of bankruptcy by fixing their deployment problems and I've seen companies fail that were unwilling to take their problems seriously.

2) The install must be bullet proof. It must work on any kind of machine you throw at it. Keep It Simple and avoid anything that could be brittle. Know and follow all current windows platform best practices

3) Perform all of your checks, user inputs, validation up front. Prevent failures up front.

4) Have a clear point of no return. You should make no state changes prior to that point and there should be no user prompts after this point.

5) Avoid Reboots - e.g. Don't settle for getting your service to start by performing a reboot

6) The installation should be transactional ; support rollback. We are all on or all off - no in between.

7) The installer must support silent installation including all settings that could be manipulated if running interactively.

8) Keep the UI Simple. People don't read; they just press next. Let the defaults represent the general case.

9) Don't step on other peoples software. Take care with regards to DLL hell when installing shared components.

10) You must have a safe uninstall that doesn't break the system or ask the user scary questions like "do you want to remove these shared dll's?" Dll what? is what your use will think.

11) Think ahead about servicing your application. You must be able to upgrades and patching ( your choice )

12) Always avoid rolling your own. Learn to use Windows Installer and follow all of it's best practices.

Finally I have a personal mantra that I follow:

It's not my machine, it's my customers machine. DO NO EVIL.

1) Don't change system settings. I once had a developer ask me to change the regional settings to make a report look better with no concern of the broader implications.

2) Don't change the security posture of the machine. Don't open up ACLs on directories or create service accounts with fixed passwords.

3) Don't install ad-ware / malware. Sorry but no, I don't want your damn Google / Yahoo! toolbar and so on. If you must, make it an opt-in not an opt-out and by damn don't intentionally break your UI so that when the user says no you do it anyways.

4) Don't be annoying with autoupdates. Make it an opt-in not an opt-out.

4 comments:

Colby Ringeisen said...

From reading Bob's original post I got the impression he was looking more for information about Windows Installer than general installation development "best practices" (I could be wrong).

My two cents: anyone not familiar with the underlying concepts of MSI who is using a development tool designed to create an MSI installer package is just asking for trouble. A lot of the various development tools do things "behind-the-scenes" that make the tool "easier" to use (which is why people use them) but if you don't understand MSI itself that can get you into trouble very quickly (particularly with maintenance releases).

If you're creating MSI installations the only real documentation on the subject is the MSDN content at http://msdn.microsoft.com/en-us/library/cc185688(v=VS.85).aspx. Get familiar with it or you will suffer the consequences down the road.

Anonymous said...

Mir haben die (deutschen) Bücher von Andres Kerl sehr geholfen:
- Inside Windows Installer
ISBN: 3-86063-099-7
- Windows Installer 3.1
ISBN: 3-86063-547-6

bernd.colve@web.de

Anonymous said...

I'm really sorry for my german comment.
It wasn't my intention to bother you or anyone else here.

Thank good for automatic tanslated web-page! Thistime it trapped me and I didn't take care of your question in english, which I thought has been written in german.
Thats why I commented the german way and accidentially gave a hind to a german windows installer book which may not help you.

(hmmmmh... is there a possibility to sign automated translated web-page-contend a little bit more?
Colored textbackground, perhaps decorated by a country-flag icon...
May be that colored web-page will help you someday, when you're on a german web-page for holyday.
On the other hand english posts in germany are not a problem germany ;-)
bernd.colve@web.de

Christopher Painter said...

It's ok, a good percentage of my readers are German speakers so it's no problem.