Classic Computer Magazine Archive COMPUTE! ISSUE 161 / FEBRUARY 1994 / PAGE 6

How to install Windows programs. (InstallSHIELD from Stirling Software) (Windows Workshop)
by Clifton Karnes

>From a developer's point of view, installing software is a nightmare. And installing Windows software is really tough. In the old days, when programs consisted of a single COM or EXE file, you just copied the program from a floppy to your hard disk. These days, programs are much more complex and often consist of many files. In addition, today's programs often have to be integrated into your environment in just the right way for them to work properly.

In the 1990s, installation programs can be very complex animals indeed. If an installation program runs correctly and does things right, there's a lot to keep track of and double-check. For example, you have to make sure that the user has enough disk space to install your program. You have to find out where the user wants to install your program, and you have to create directories, decompress files, create a Program Manager group and add icons to it--and all the while, you need to keep the user informed about the installation's progress.

Because installation software is so specialized, most developers and publishers don't write their own programs. They use an installation engine. There are several of these to choose from, but the ones you'll see most often are Microsoft Setup (which used to be available with many Microsoft language products but is now only available to developers upon request) and Stirling Software's InstallSHIELD.

I just finished writing a book, Essential Windows Power Tools, which features a disk of Windows utilities, and I needed to create an installation program for the disk. I looked at Microsoft Setup, and although it seemed to be able to do everything I wanted, it required quite a bit of space on the installation disk (about 450K for the engine), it demanded some extra C programming, and it looked a little complicated in general.

>From appearances, InstallSHIELD 2.0 (The Stirling Group, $495, 800-374-4353) was easier to use and made a smaller footprint on the disk (about 150K), so I decided to try it first. I wasn't disappointed.

First, before talking about using InstallSHIELD, I should point out that you've probably seen the program but didn't pay much attention to it. I'd estimate that 75 percent of the commercial Windows programs available use the InstallSHIELD engine.

InstallSHIELD programs are distinctive. The upper part of the installation screen is a bitmap the author can specify. The center of the screen is a progress indicator. On the left you'll find gauges for hard disk and RAM usage, below these you'll see a text window, and on the bottom right you'll see buttons labeled Exit, Pause, and Help.

>From a user's point of view, installing a program should be painless and transparent. You should have the option to installing the software where you want, and you should be consulted on all important decisions, but the program should supply you with intelligent defaults for all of these. If the installation program does its job right, installation can be quick and easy.

With InstallSHIELD, you create a C-like script that the install engine reads. This script controls exactly what happens during an installation. Basically, you do five things with your script: Check to see if the user has enough hard disk space for the program, ask the user where the new program should go, install the program, build a Program Manager group with an icon for each program in the application, and give the user the option to view your readme file.

This may sound simple, but to take into account everything that can go wrong, there's quite a bit to do. The script for my Essential Windows Tools disk (which installs 14 programs) is 757 lines long. Before you start creating your script, you need to decide whether or not you want to compress your source files. InstallSHIELD comes with its own compression utility (unfortunately DOS based) that gives excellent compression.

After deciding the compression issue, you're faced with creating your own script. You'll want to start with one of the supplied scripts and modify it.

When you've finished with your script, you compile it with InstallSHIELD's DOS-based compiler. When the compilation's complete, you can run SETUP.EXE and test your installation program.

It took me about five hours (spread over several days) to really learn how to use InstallSHIELD, and creating my first installation script (which was fairly complicated) took another five hours. When I needed to develop a second install script, however, the installation went very quickly. I created that installation disk in about two hours.