Creating an INF-Based Setup Script

This topic describes the recommended sequence of steps to follow when creating a setup script for an IHV link service. It will be helpful to refer to existing .INF files while reading this discussion.

Create the Initialization Section

The first section in the setup script is the initialization section. It contains most of the constant text strings and other values that describe the link service and its components. It is important that a clear layout of the SNA options and their additional components is created in this section.

Define the Parameters

Define the parameters for each component and how they fit into the registry. It is generally a good idea to name the variables for these parameters after their names in the registry, as this simplifies the code and greatly improves its readability.

Complete the Basic Code

Fill in the code sections in the main body of the setup script. Write only the code to initialize the components and write their parameters to the registry. Since modification of variables involves reading their values from the registry, it can be ignored until this step is complete and the information in the registry is correct.

Design Dialog Boxes

Copy the Setup Resource Library template files into another directory, then change the file names from TEMPLATE.* to WHATEVER.* (use whatever name you want). Using the Dialog Editor, add your own dialog boxes that will be used to modify the parameters. Make sure the dialog box layouts are clear and intuitive. Consider which dialog boxes will require online Help. Also, remember that controls should be accessible by tabbing.

When your dialog boxes are complete, edit the makefile and .RC file to make sure all paths and file names are correct. Type NMAKE to build the new SRL.

Fill in the Code

Fill in the code sections to modify the variables. This includes writing the dialog box-handling code as subroutines in the script and writing the sections that call those subroutines from the main body of the script. This step is probably the most complex. The existing link service setup scripts provide examples.