A.2.1 Required oemsetup.inf Sections

An oemsetup.inf file must include a set of required shell sections that serve as entry points to be called by the Setup program. You can add additional sections as needed. The DDK includes sample oemsetup.inf files that illustrate the use of the required sections. You can use a sample file as a template in creating your own version of the file. The following sections are required in an oemsetup.inf file:

The Identify Section

The [Identify] section is the first section executed by Setup. It returns information to Setup about the type of driver or drivers that can be installed by this INF file. Setup will not proceed with the installation if the driver type returned by the [Identify] section does not match the driver type specified by the user. For example, if the user runs Setup, and chooses to add a SCSI driver, installation fails if the file’s [Identify] section returns an option type other than SCSI.

The [Identify] section also returns a string that specifies the name of the floppy disk containing the driver’s files. Setup ignores this string.

The ReturnOptions Section

If the [Identify] section indicates that the INF file supports the appropriate type of driver, Setup calls the [ReturnOptions] section. Setup passes a single parameter to this section, indicating the language (English, Spanish, and so on) to be used for dialog strings. This enables the INF file to support a variety of languages. This section returns information to the Setup program, listing the names of any drivers that can be installed by this INF file. It also returns the text strings for each driver (in the requested language) to be used in the dialog box that asks the user to select the driver to install.

The InstallOption Section

If the [ReturnOptions] section returns successfully, indicating the language is supported, Setup displays a dialog box from which the user can select a driver to install. If the user proceeds with the installation, Setup calls the [InstallOption] section. Setup passes the following parameters to the [InstallOption] section:

Language to use
OptionID to install
SourceDirectory
AddCopy  (YES | NO)
DoCopy   (YES | NO)
DoConfig (YES | NO)
 
The Source Media Descriptions Section

The [Source Media Descriptions] section is a detect section required in all oemsetup.inf files. It consists of a line for each floppy disk that is part of your distribution set. The format for each line is as follows:

LineKey = [DiskDescription, TAGFILE = TagFileName]

LineKey
An integer [1 to 999] that identifies the line for later access. Lines must be numbered consecutively beginning at 1.
DiskDescription
Disk name string for prompting the user to insert the disk. This is ignored if the source is not removeable media.
TagFileName
Specifies the name of the file whose presence on the disk indicates to the Setup program that the correct disk has been inserted. This is ignored if the source is not removeable media. Note that TAGFILE, =, and TagFileName must be separated by whitespace.

For example:

[Source Media Descriptions]
1  = "Driver Disk #1"  , TAGFILE = disk1
2  = "Driver Disk #2"  , TAGFILE = disk2