Using the Supplied Install Program

As shipped with Microsoft Visual C++ 5.0, the DAO SDK is divided into four subdirectories labeled disk1 through disk5. This setup has been structured so that you can take the parts you need and use them directly with no recompilation required. In particular, two options are available for redistribution:

To enable these options, you need to replace the Setup.iss and Setup.pkg files that are found in disk1. A set of alternate replacement files are provided in the disk1 directory called Daomin.iss/Pkg/Ins (note the third file in this case). The Daomin files will install DAO with the ability to read Microsoft Jet 3.x databases only. In addition to replacing the ISS and PKG files, you will need to make sure that the appropriate compressed files are also available.

Assembling the Files

The DAOMIN installation requires the following files:

If you are distributing over a network, CD-ROM, or some other media format large enough to put all of the files into one directory, then you can simply place all the files in one directory and invoke Setup from that location. If you are distributing on 1.44 MB floppies, then take care to group the files the same way that they are grouped in the \Daosdk\Disk directories on your distribution CD-ROM; for example, DISK2 should include Daocore.2 and Jetisam.z. You will also need to add the file Disk2.id to your second disk.

Note If you alter how the files are grouped across directories and/or disks, you must supply a new InstallShield packing list (.pkg) file. See the InstallShield documentation for details on how to do this.

Executing Setup

Neither of the options outlined above require any input from the user. Execute the DAO Setup program with the following command line:

setup -s

This will silently install DAO with no visual feedback, unless another disk is required. If you omit the -s flag, the DAO Setup introductory screen will be displayed until the user chooses Next, which will start copying files.

If you are invoking setup from another program, you can check the status of the install two ways.

The first way is to check the return code of the Setup.exe call. This will tell you whether Setup.exe successfully began the installation process. However, since the setup happens in the background, the call will actually return before the setup is complete.

A second, more robust technique is to invoke setup with the command line:

setup -s -f2c:\somefile.log

The -f2 option forces a log file to be written to the location specified. By examining the log file, your program can determine if the setup has completed successfully by searching for the string “ResultCode=0”.

Note InstallShield in silent mode must write a log file. If you omit the -f option, it will try to create a log file in the default directory which often is a read-only diskette.