Creating Country Specific Install Packs


Introduction

 

The CRIS Country Specific Install Packs utilize the Window Installer service and should operate on most Windows Platforms (95, 98, ME, NT 4.0 and 2000). To run the installation simply run the setup.exe file and respond to the prompts.

 

Users are given two options for installation:

1.       Typical install – this puts all necessary files on the hard drive at the location specified by the user during the installation process.

2.       Custom install – this allows the user flexibility in selecting which items to install. This is most useful if the installation needs to be modified or repaired at a later date.

 

In order to access country specific data it is necessary to also install the CRIS Frontend. This will install an ArcView extension and a front end database with a user interface.

 

Background and requirements

 

This document assumes a very basic understanding of InstallShield Express 3.0. For more background information please consult the InstallShield Express manual.

 

In order to modify CRIS Country Specific Install Packs you will require the following:

1.       Windows 98, NT or 2000,

2.       InstallShield Express 3.0 or later installed,

3.       The InstallShield file that describes the install pack:  CRIS_<XXXX>.ism

4.       Access 2000.

 

 

Components of the Install Image

 

The install image that you finally copy to CD is composed of the following files created by InstallShield:

 

Organizing your hard drive

 

The sources for various files used by InstallShield are included in the .ISM file with their full path names. These means it is easiest to use the file if you reproduce a standard file structure on your hard drive. This file structure should be as follows:

1.       The basic CRIS directory organized as you would normally expect it to be installed on the end user computer. You will get this if you start from a typical install and select the default installation directory: C:\Program Files\CRIS\<XXXX>.

2.       A directory called C:\CRISInstallImage where InstallShield will distribute its results and where you can copy other components of the image prior to burning CDs if you wish.

3.       A directory containing the CRIS_<XXXX>.ism file(s). InstallShield Express will build a set of working sub-directories below this directory.

 

 

Making ArcView Projects moveable

 

ArcView Project files (.apr) are text files that contain detailed information about all aspects of the project. ArcView saves information on file locations with full path names; this means if a project (and its data files) is moved or installed to a different location then it will not be able to find its data.

 

This is a particular problem when building a CRIS install pack since the .apr file and GIS data may be installed on any directory.

 

To resolve this problem it is necessary to edit the .apr file just prior to building the install pack and make all file names relative. As long as all GIS data files maintain their location relative to the .apr file then ArcView will find them without a problem.

 

Note that if you run ArcView on a project after you have made the file names relative and save that project from ArcView it will turn all of the file names back to full path names again.

 

To make filenames relative in the ArcView project files for CRIS do the following:

1.       Make a backup of the .apr file in case you make a mistake in editing;

2.       Edit the .apr file using a text editor such as WordPad;

3.       Replace all instances of the string defining the directory containing the .apr file with an empty string (Replace All in the Find menu for WordPad). For example this will typically mean converting strings like:

 

Path: "c:/program files/cris/jamaica/avdata/discovery bay/demo.shp"

To:

Path:  "discovery bay/demo.shp"

By removing all instances of the string:

 

c:/program files/cris/jamaica/avdata/

4.       Save your edits as a text file;

5.       Load the project into ArcView to ensure that it loads without errors but do not save the project from ArcView or you will have to edit the .apr file again.

 

Rebuilding Install Packs with updated files

 

In order to rebuild a fresh install pack with updated files (.mdb or .apr files for example) do the following:

1.       Set up your hard drive as described above with the new files in place.

2.       If you have updated the ArcView Project file (.apr) then follow the instructions in the section “Making ArcView Projects moveable” above.

3.       Run InstallShield Express and load the .ism file for the install pack you are rebuilding.

4.       On the main menu select “Build | Build CD-ROM”.

5.       When InstallShield finishes building select “Go | Distribute your release” from the main menu.

6.       Add the other files required to the c:\CRISInstallimage directory if you wish. It is not necessary to add any files for the system to operate successfully but you may wish to distribute other information with the basic install pack.

7.       Copy all the files and directories in c:\CRISInstallImage to a CD or put them into a zip or self extracting zip depending on how you want to deliver them.

8.       Test the install pack on a number of different computers in different configurations to ensure it works.

 

Adding new files to an existing Install Pack

 

Adding new files to an existing install pack requires additional steps. The complete sequence is as follows:

1.       Set up your hard drive as described above with the new files in place.

2.       If you have updated the ArcView Project file (.apr) then follow the instructions in the section “Making ArcView Projects moveable” above.

3.       Run InstallShield Express and load the .ism file for the install pack you are rebuilding.

4.       Select the menu option “Go | Files” to get to the files view. This will allow you to add or remove files from the installation.

5.       To add or delete GIS data files, select the “GIS Spatial Data Files” Feature in the drop down box near the top of the main window.

6.       The Destination Computer window allows you to see what files are being copied to the destination computer as part of the GIS Data Files feature. You can add new files by finding them in the Source Computer window and dragging and dropping them on the appropriate destination computer directory.

7.       Files can be removed by selecting them in the Destination Computer window and pressing the delete key or using the menu from the right mouse click.

8.       Files can be added to or deleted from the other features in a similar fashion but this is a less common activity.

9.       On the main menu select “Build | Build CD-ROM”.

10.   When InstallShield finishes building select “Go | Distribute your release” from the main menu.

11.   Add the other files required to the c:\CRISInstallimage directory as described above.

12.   Copy all the files and directories in c:\CRISInstallImage to a CD or put them into a zip or self extracting zip depending on how you want to deliver them.

13.   Test the install pack on a number of different computers in different configurations to ensure it works.

 

Creating a new Country Install Pack

 

Creating a new country install pack is best done by starting with an existing install pack and modifying it. This will require a slightly higher level of expertise with InstallShield and the resulting install pack should undergo a more careful round of testing.

 

It is important that you pick a single “Country name” as described in item 2c below and stick to this throughout the install pack creation process.

1.       Set up your hard drive for your new country/install pack as described above with all of the new files in place.

2.       Pick a name for your ArcView project file that follows the following conventions:

a)   No spaces – use underscores if you wish;

b)   First five characters of name are “CRIS_”

c)   The rest of the name consists of the country name you will be using throughout the install building process. For example “Trinidad” or “St_Kitts”.

d)   Examples of valid names are:

CRIS_Trinidad.apr; and

CRIS_St_Kitts.apr.

3.       Follow the instructions in the section “Making ArcView Projects moveable” above on your new ArcView project file.

4.       Make a copy of  the existing CRIS_training.ism file and rename it as appropriate for the new target country.

5.       Open the new .ism file in InstallShield Express.

6.       The next step is to go through a number of the items in the check list on the left of the InstallShield Express main window and change the country name where necessary in each. The following InstallShield Express dialogs will need to be worked on:

a)   Organize Your Setup: General Information

i.    Product Name should be changed - This is used widely by InstallShield for dialog text and file names so keep it fairly short (e.g. CRIS Trinidad Data).

ii.    Product version – Set this to a value that is appropriate to this version of the data you are installing. Always increment this number for each installation.

iii.   Click on the Product Code item and then click on the “Generate GUID” button. This will generate a new unique product identifier. This is an essential step when you have copied from a previous install pack.

iv.   Click on the Upgrade Code item and then click on the “Generate GUID” button. This will generate a new unique identifier. This is an essential step when you have copied from a previous install pack.

v.   You can modify any of the other data in this dialog as you see fit for documentation purposes.

b)   Specify Application Data: Files

For each of the following Features (selected from the drop down list near the top of the main window) make the described changes:

i.    For all features, rename the folder “Training” (under the folder [INSTALLDIR] to an appropriate name (e.g. “Trinidad”).

ii.    Access Database Files: Delete the existing files from the destination computer window and copy new data files from your source computer directories. This includes all files in the country folder (e.g. CRIS_Trinidad.mdb and CRIS_Trinidad.bak) and any format templates (.doc and .xls files) in the Templates folder. Do not include the file Templates\new.txt in this feature.

iii.   Always Install: The options in this feature simply copy across zero length files (files: Templates\New.txt and AvData\New.txt) to ensure that the directories are created on the destination computer.

iv.   GIS Spatial Data Files: Delete all of  the existing files from the destination computer window for the AvData folder. Copy the entire AvData directory structure from your source computer into the AvData folder on the destination computer. This includes the ArcView project (.apr) file and all of the shape files. Do not include the files AvData\New.txt and AvData\CRISParameters.dbf file in this feature.

v.   GIS Parameters: Delete the CRISParameters.dbf file from the destination computer window for the AvData directory and replace it with the CRISParameters.dbf file for your new country.

c)   Configure the Target System: Registry - A number of changes are required so that the installation package will correctly configure the destination computers Windows Registry database. Considerable care should be taken in doing this. As long as you restrict yourself to changed Value Data for existing keys as described below you will not damage the destination computer.

 

All of the following registry changes are made to or under the key (where <XXXX> is the country name):

HKEY_LOCAL_MACHINE\SOFTWARE\ESSA Technologies Ltd.\CRIS Country Specific Data\<XXXX>

For each of the following Features (selected from the drop down list near the top of the main window) make the described changes:

i.    Access Database Files:

·         Change the name of the country key to the country name you have chosen;

·         Change the name of the ODBC Source to the ODBC Source name you will create in the next step;

·         Change the name of the country specific .mdb file in the DatabaesPath value.

·         Change the database version number if necessary.

ii.    GIS Data Files:

·         Change the name of the country key to the country name you have chosen;

·         Change the name of the GIS Path to the country name you have chosen;

·         Change the name of the GISProjectFile to the ArcView project file you have created for this country.

·         Change the GIS version number if necessary.

d)   Configure the System: ODBC Resources – You must first create an appropriate ODBC source on your computer and then select this instead of the source name currently selected in the ODBC Resources Dialog.

i.    Start the ODBC Data Source Administrator (or equivalent on your computer) from the Control Panel;

ii.    Click on the “System DSN” tab;

iii.   Click on the “Add” button;

iv.   Select the “Microsoft Access Driver (*.mdb)”;

v.   Enter the source name based on the Country name you have chosen, for example:

CRIS_TRINIDAD;

vi.   Click on the “select” button and navigate to the country specific .mdb file in your CRIS directory;

vii.  Click on the “Advanced Button” and enter “Admin” for the login name then click on “OK”

viii. After you have done this it may be necessary to restart InstallShield Express before this source becomes available.

ix.   In the ODBC Resources dialog in InstallShield Express select your new ODBC source under “Drivers | Microsoft Access Driver” and deselect all other sources.

x.   Change the DBQ property to point to the correct mdb filename under the [INSTALLDIR] folder on the destination computer (e.g. change the property to [INSTALLDIR]Trinidad\CRIS_Trinidad.mdb)

xi.   While your new source is highlighted ensure that in the features window “Always Install” is checked and that none of the other features are checked.

7.       Select File|Save to save your changes.

8.       On the main menu select “Build | Build CD-ROM”.

9.       When InstallShield finishes building select “Go | Distribute your release” from the main menu.

10.   Add the other files required to the c:\CRISInstallimage directory as described above.

11.   Copy all the files and directories in c:\CRISInstallImage to a CD or put them into a zip or self extracting zip depending on how you want to deliver them.

12.   Test the install pack on a number of different computers in different configurations to ensure it works.

 

Using InstallShield Express and, if necessary InstallShield for Windows Installer it is possible to customize the installation even further, changing dialogs and text and many other aspects. This should only be attempted by people who clearly understand the implications of their changes.

 

Troubleshooting

 

·         Error on running setup.exe from CD:

<FILE: …… .ism not found>

 

This error occurs on some Windows 95 and 98 machines which do not support long file names on the CD drive.  To work around this do the following:

1.       copy all of the files from the CD drive onto a temporary directory;

2.       change the properties on the setup.ini file so it is not read only;

3.       edit the setup.ini file using a utility such as WordPad;

4.       find the line that starts: “Package Name=” and change the file name after the equals sign to the 8 letter filename created by the system for the .ism file, “crisco~1.ism” for example;

5.       save the updated version of setup.ini;

6.       run the setup.exe file from the temporary directory and install following prompts in the normal fashion; and

7.       delete the files from the temporary directory.

 


Topics      Steps      System Manual Home      CPACC Home

Questions or problems regarding this web site should be directed to [email protected].
Last modified: July 13, 2001