Friday, October 01, 2004

Automated Software Installation

Problem: It's hard to call software installation a "problem" anymore. It has gotten very easy over the past few years. Today, it's mostly a snap. But, as easy as it is, if you have to install the same load of software on lots of machines, it can be very tedious. Today I had to install the same four products plus multiple upgrades for each product on 15 machines. UGH! It took me several boring hours. Unfortunately, most installations still require some interventions/decision making during the install, so you usually can't just start them and walk away. There's got to be a better way. There is.....

Solution: This is not a comprehesive study of how to automate software installation. I'm sure that if you're into this full time you can find any number of products for sale on the market to help with the automation. I'll only talk about one way that I have used to automate the process, that's sort of quick and dirty, but more important....it's FREE. I like free. The product I use is Auto-It from Hiddensoft. In a nutshell, Auto-It is a fairly simple scripting product that allows you to:
  • Execute programs (DOS commands and others)
  • Send keystrokes and mouse clicks
  • Conditonal processing
  • Manipulate windows and check window status
  • Some clipboard functions
  • Read from and write to the registry
  • Manipulate strings and variables

For example: Say you have some software to install that requires some different settings based on the OS it runs under. It uses some number of windows to prompt you for information, not only yes and no stuff, but installation paths, registrations numbers, radio button options, check boxes, etc. Furthermore, the software requires that previous releases be removed first and also depends on prerequisite software that is not part of this package. Finally, it requires a reboot of the host system at the end of the process.

Auto-It can handle all these things.

To continue the example, the script can read the registry to determine which OS is running on the target machine and save the information in a variable to be used later in the script. At the same time it can check the registry for prerequisite software and do conditional processing based on what it finds (stop the process? Issue a message? Install the prereq? etc.). It can also kick off an uninstall process for previous releases, if necessary. Once the preliminaries are done, the script can then start the install process and watch for windows/dialog boxes that need other information. When information is needed the script can fill in boxes, press buttons, etc. When the script senses the end of the install dialog, it can force a reboot. AND, if this isn't enough, you can also compile the script into an executable so you don't need to have Auto-It installed on the machines where you need to run the script!

Very slick and easy to use! Of course, you wouldn't want to bother writing a script unless there is some level of complication in the process, or unless you have lots of mind-numbing installations to do. I sure could have used one today...... :o(

No comments: