Appendix C - Windows 98 INF Files

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This appendix describes the structure for the information files (INF) used to configure devices and networking components in Microsoft Windows 98.

This information is of particular use if you are creating custom setup scripts. This description of the INF file format will help you read the information in the Windows 98 INF files to find the values provided in Msbatch.inf. The general format is also used for statements in the [Install] section of Msbatch.inf.

Windows 98 Device Information Files Overview

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Device information files provide information used by Windows 98 to install software that supports a given hardware device. When hardware manufacturers introduce new products, they must create INF files to explicitly define the resources and files required for each class of device.

The format of the INF files is based on Windows 3.x INF files:

  • Section names are enclosed in brackets ([ ]) and must be unique within an INF file. 

  • Keys within a section do not have to be unique, but the order of keys within a section is significant.

  • Private sections in an INF file are not evaluated by Windows 98.

The operating system detects the unique ID of each device installed. For the device identified, a specific section of the INF file provides information on that class of device; the following describes the information contained in a typical INF file section.

General INF File Format

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

An INF file is organized in several sections, which define information that Setup and the hardware detection process use to determine the resource needs of the hardware device, and to install software for that device. An INF file is organized by hardware, with each class of device described in its own section. Within each device section, the following general organization applies.

[Version] section

Contains a simple header that identifies the INF and the class of device this INF supports.

[Manufacturer] and [Manufacturer Name] sections

Lists all the individual manufacturers of the devices identified in this file and lists all the devices built by that manufacturer. These entries are displayed directly to the user and used to generate the appropriate registry entries. There must always be at least one manufacturer section.

[Install] section

Describes the device driver and physical attributes of the hardware device. It also identifies the names of all the [Install] sections that contain information and instructions for installing this device.

[ClassInstall] section

Defines a new class for this device. (Optional.)

[Strings] section

Defines all localizable strings used in the INF file.

Each section contains one or more entries. The typical entry consists of a key and a value separated by an equal sign. Keys within a section do not have to be unique, but the order of keys may be significant depending on the purpose of the section. An INF file can include comments — any string of text, up to the end of the line, that begin with a semicolon. A comment can start anywhere on a line.

For example:

Key=value ; comment

For complete details about the syntax and use of statements in Windows 98 INF files, see the Microsoft Win32 Software Development Kit for Windows 98 and Windows NT. For more information about the content structure of Windows 98 INF files, see the Microsoft Windows 98 Driver Development Kit.

[Version] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[Version]
Signature="$Chicago$"
LayoutFile=filename.inf 

The [Version] section defines the standard header for all Windows 98 INF files.

Signature 

The signature string is case-insensitive.

filename.inf 

Names the INF file that contains the layout information (source disks and files) required for installing this driver software. Typically, for Windows 98 components, this is Layout.inf, Layout1.inf, or Layout2.inf. This line is optional. If not given, the [SourceDisksNames] and [SourceDisksFiles] sections must be given in this INF.

This example shows a typical [Version] section:

[Version]
Signature="$Chicago$"
LayoutFile=LAYOUT.INF

[Manufacturer] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[Manufacturer]
manufacturer-name | ***%strings-key%=***manufacturer-name-section 

The [Manufacturer] section identifies the manufacturer of the device and specifies the name of the [Manufacturer Name] section that contains additional information about the device driver.

manufacturer-name 

Name of the manufacturer. This name can be any combination of printable characters, but must uniquely identify the manufacturer and must be enclosed in quotation marks.

strings-key 

Name of a string as defined in a [Strings] section.

manufacturer-name-section 

Name of the [Manufacturer Name] section. This name can be any combination of printable characters, but must uniquely identify the manufacturer name.

The following example shows a typical [Manufacturer] section in which a string key, %M1%, is used to identify the manufacturer. In this example, the [Manufacturer Name] section is APEXD.

[Manufacturer]
%M1%=APEXD ; Strings key for this manufacturer

[Manufacturer Name] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[ manufacturer-name ]
device-description = install-section-name, device-id[**,**compatible-device-id]...

The [Manufacturer Name] section gives the device description and identifies the [Install] section for this device. The manufacturer-name section name must be defined in the [Manufacturer] section.

device-description 

Description of the device to install. This can be any combination of printable characters or a strings key.

install-section-name 

Name of the [Install] section for this device.

device-id 

Identifier for this device.

compatible-device-id 

Identifier of a compatible device. More than one compatible-device identifier can be given, but each must be preceded by a comma.

The following example shows a typical [Manufacturer Name] section. The name of the [Install] section for this device is SuperSCSI. This device-id is *PNPA000 and its compatible device identifier is *PnPA001.

[APEXD]
%DevDesc1% = SuperSCSI, *PNPA000, *PnPA001

For each driver installed using this INF file, Setup uses the information in these [Manufacturer Name] sections to generate Driver Description, Manufacturer Name, DeviceID, and Compatibility list entries in the registry.

[Install] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[ install-section-name ]
Copyfiles= file-list-section[**,**file-list-section]...
LogConfig=log-config-section-name
**Renfiles=file-list-section[,**file-list-section]...
**Delfiles=file-list-section[,**file-list-section]...
**UpdateInis=update-ini-section[,**update-ini-section]...
**UpdateIniFields=update-inifields-section[,**update-inifields-section]...
**AddReg=add-registry-section[,**add-registry-section]...
**DelReg=del-registry-section[,**del-registry-section]...
**Ini2Reg=ini-to-registry-section[,**ini-to-registry-section]...
**UpdateCfgSys=**update-config-section
**UpdateAutoBat=**update-autoexec-section 

The [Install] section identifies the additional sections in the INF file that contain descriptions of the device and instructions for installing files and information needed by the device drivers. The install-section-name must be defined in a [Manufacturer Name] section and consist of printable characters.

Not all entries in this section are needed or required. If an entry is given, it must specify the name of a section. (An exception to this is the CopyFiles entry.) More than one name can be given for each entry, but each additional name must be preceded by a comma. The exact format and meaning of the corresponding entry depends on the entry type and is described in later sections. Each [Install] section should include the creation date of the driver set.

This example shows a typical [Install] section:

[MyApplication] 
Copyfiles=MyAppWinFiles, MyAppSysFiles, @SRSutil.exe 
AddReg=MyAppRegEntries

Note that by renaming the [MyApplication] section to [DefaultInstall] (in the above example), this Install section would be executed—when the "Install" verb is selected by right-clicking the INF file.

The CopyFiles entry provides a special notation which will allow a single file to be copied directly from the copy line. An individual file can be copied by prefixing the file name with an @ symbol. The destination for any file copied using this notation will be the DefaultDestDir as defined in the DestinationDirs section. The following example shows how to copy individual files: 

CopyFiles=FileSection1,@myfile.txt,@anotherfile.txt,LastSectionName 

[Logical Configuration] Sections

Syntax 

[ log-config-section-name ]
ConfigPriority = priority-value
MemConfig = mem-range-list
I/OConfig = io-range-list
IRQConfig = irq-list
DMAConfig = dma-list 

A [Logical Configuration] section defines configuration details, such as IRQs, memory ranges, I/O ports, and DMA channels. An INF file can contain any number of [Logical Configuration] sections, as many as are needed to describe the device dependencies. However, each section must contain complete details for installing a device. The log-config-section-name must be defined by the LogConfig entry in the [Install] section.

Not all entries are needed or required. If an entry is given, it must be given appropriate values as described in the subsequent sections.

Each entry can specify more than one resource. However, during installation only one resource from an entry is used. If a device needs multiple resources of the same type, multiple entries must be given. For example, to ensure two IRQs for a device, two IRQConfig entries must be given. If a device does not require an IRQ, no IRQConfig entry should be given. For each entry, Setup builds binary logical configuration records and adds these to the driver section of the registry.

[Update AutoExec] Section

Syntax 

[ update-autoexec-section ]
CmdDelete= command-name
CmdAdd= command-name[**,**command-parameters]
**UnSet=**env-var-name
**PreFixPath=ldid[,**ldid]
**RemOldPath=ldid[,**ldid]
**TmpDir=ldid[,**subdir]

The [Update AutoExec] section provides commands to manipulate lines in the Autoexec.bat file. The update-autoexec-section name must appear in an UpdateAutoBat entry in the [Install] section.

Not all entries are needed or required. The section can contain as many CmdAdd, CmdDelete, and UnSet entries as needed, but only one entry for PreFixPath, RemOldPath, and TmpDir can be used per file.

Setup processes all CmdDelete entries before any CmdAdd entries.

For more information about LDID values, see "[Update INI] Section" later in this appendix.

[Update ConfigSys] Section

Syntax 

[ update-config-section ]
Buffers= legal-dos-buffer-value
DelKey= key
DevRename= current-dev-name,new-dev-name
DevDelete= device-driver-name
DevAddDev= driver-name,configkeyword[**,flag][,**param-string]
**Files=**legal-dos-files-value 
PrefixPath=ldid[,ldid]...
RemKey=key 
**Stacks=**dos-stacks-value 

The [Update ConfigSys] section provides commands to add, delete, or rename commands in Config.sys. The update-config-section name must appear in an UpdateCfgSys entry in the [Install] section.

Not all entries are needed or required. This section may contain as many DevRename, DevDelete, and DevAddDev entries as needed, but the other commands may only be used once per section. When processing this section, Setup processes all DevRenames entries first, all DevDelete commands second, and all DevAddDev commands last.

Not all entries are needed or required. An Update Config.sys section may contain as many DevRename, DevDelete, DevAddDev, DelKey, and RemKey items as needed, but the Buffers, Files, and Stacks items may only be used once in a section. When processing this section, the Installer processes all DevRenames items first, all DevDelete items second, and all DevAddDev items last.

Buffers Item

Buffers=legal-dos-buffer-value

Sets the number of file buffers. As it does with the Stacks item, the Installer compares the existing value with the proposed value and always sets the file buffers to the larger of the two values.

DelKey Item

DelKey=key causes the Config.sys command with the specified key to be remarked out in the Config.sys file. For example, the INF file item* *DelKey=Break would cause a Break=on command to be remarked out in the Config.sys file. The DelKey item has the same effect as the RemKey item. There can be multiple DelKey and/or RemKey items in a section of the INF file.

The key item is the Config.sys command to be remarked out.

DevAddDev Item

DevAddDev=driver-name,configkeyword[,flag][,param-string]

Adds a device or install command to the Config.sys file.

driver-name 

Name of the driver or executable file to add. The installer validates the file name extension, ensuring that it is .sys or .exe.

configkeyword 

Command name. Can be device or install.

flag 

Optional placement flag. If 0, the command is placed at the bottom of the file. If 1, it is placed at the top. If flag is not given, 0 is used by default.

param-string 

Optional command parameters. Must be valid for the given device driver or executable file.

DevDelete Item

DevDelete=device-driver-name

Deletes any line containing the specified file name from the Config.sys file.

device-driver-name 

Name of a file or device driver. The Installer searches the Config.sys file for the name and deletes any line containing it. Because MS-DOS does not permit implicit file name extensions in Config.sys, each device-driver-name must explicitly specify the file name extension.

This example DevDelete item in an Update Config.sys section deletes lines 1 and 3 but not line 2 of the example Config.sys file:

DevDelete=Foo.sys

;; lines in CONFIG.SYS 
Device=Foo.sys ;; line #1 
Install=foo.exe ;; line #2 
Device=Foo.sys /d:b800 /I:3 ;; line #3
DevRename Item

DevRename=current-dev-name,new-dev-name

Renames a device driver in the Config.sys file.

current-dev-name 

Name of the device driver or executable file to rename. The installer looks for the name on the right side of a device or install command in the Config.sys.

new-dev-name 

New name for driver or executable file.

Files Item

Files=legal-dos-files-value

Sets the maximum number of open files in the Config.sys file. As it does with the Stacks item, the Installer compares the existing value with the proposed value and always sets the maximum number of open files to the larger of the two values.

legal-dos-files-value 

A legal MS-DOS files value.

PrefixPath Item

PrefixPath=ldid[,ldid]...

Appends the path associated with the given LDID to the path command.

ldid 

Can be any of the predefined LDID values or a new value defined in the INF. For a definition of all the predefined LDID values, see the "Reference" topic about the DestinationDirs section.

RemKey Item

RemKey=key causes the Config.sys command with the specified key to be remarked out in the Config.sys file. For example, the INF file item RemKey=Break would cause a Break=on command to be remarked out in the Config.sys file.

The RemKey item has the same effect as the DelKey item. There can be multiple RemKey and/or DelKey items in a section of the INF file.

key 

The key of the Config.sys command to be remarked out.

Stacks Item

Stacks=dos-stacks-values

Sets the number and size of stacks in the Config.sys file. The Installer compares the existing value with the proposed value and always sets the stacks to the larger of the two values. For example, if Config.sys contains stacks=9,218 and an INF contains stacks=5,256, the installer sets to new value to stacks=9,256.

legal-dos-stacks-value 

A legal MS-DOS stacks value.

[Update INI] Section

Syntax 

[update-ini-section-name]
ini-file, ini-section, [old-ini-entry], [new-ini-entry], [flags]

Replaces, deletes, or adds entries in the given INI file. The update-ini-sectionname must appear in an UpdateInis entry in the [Install] section.

ini-file 

Name of the INI file containing the entry to change. For more information about specifying the INI file name, see the comments below.

ini-section 

Name of the section containing the entry to change.

old-ini-entry 

Usually in the form Key=Value. (Optional.)

new-ini-entry 

Usually in the form Key=Value. (Optional.) Either the key or value may specify replaceable strings. For example, either the key or value specified in the new-ini-entry parameter may be %String1%, where the string that replaces %String1% is defined in the Strings section of the INF file.

The optional action flags can be one of these values:

0

Default. If old-ini-entry key is present in an INI file entry, that entry is replaced with new-ini-entry. Note that only the keys of the old-ini-entry parameter and the INF file entry must match; the value of each entry is ignored.

1

If both key and value of old-ini-entry exist in an INI file entry, that entry is replaced with new-ini-entry. Note that the old-ini-entry parameter and the INF file entry must match on both key and value for the replacement to be made (this is in contrast to using an action flag value of 0, where only the keys must match for the replacement to be made).

2

If the key in the old-ini-entry parameter does not exist in the INI file, then no operation is performed on the INI file. If the key in the old-ini-entry parameter exists in an INI file entry and the key in the new-ini-entry parameter exists in an INI file entry, then the INI file entry that matches the key in the new-ini-entry parameter is deleted and the INI file entry that matches the old-ini-entry parameter is operated on in the following way: the key of the INI file entry is replaced with the key in the new-ini-entry parameter. If the key in the old-ini-entry parameter exists in an INI file entry and the key in the new-ini-entry parameter does not exist in an INI file entry, then an entry is added to the INI file made up of the key in the new-ini-entry parameter and the old value. Note that the match of the old-ini-entry parameter and an INI file entry is based on key alone, not key and value.

3

Same as flag parameter value of 2 described above, except match of the old-ini-entry parameter and an entry in the INF file is based on matching both key and value, not just the key.

To add new-ini-entry to the INI file unconditionally, set old-ini-entry to NULL. To delete old-ini-entry from the INI file unconditionally, set new-ini-entry to NULL. The wildcard character (*) can be used in specifying the Key and Value, and they will be interpreted correctly.

The ini-file name can be a string or a strings key. A strings key has the form %strkey% where strkey is defined in the [Strings] section in the INF file. In either case, the name must be a valid file name.

The name should include the name of the directory containing the file, but the directory name should be given as a logical directory identifier (LDID) rather than an actual name. Setup replaces an LDID with an actual name during installation.

An LDID has the form %ldid% where ldid is one of the predefined identifiers or an identifier defined in the [DestinationDirs] section. For LDID_BOOT and LDID_BOOTHOST, the backslash is included in the LDID, so %30%boot.ini is the correct way to reference Boot.ini in the root of the boot drive.

The following examples illustrate entries in this section:

%11%\sample.ini, Section1,, Value1=2 ; adds new entry
%11%\sample.ini, Section2, Value3=*, ; deletes old entry
%11%\sample.ini, Section4, Value5=1, Value5=4 ; replaces old entry

[Update IniFields] Section

Syntax 

[ update-inifields-section ]
ini-file, ini-section, profile-name, [old-field], [new-field]

Replaces, adds, and deletes fields in the value of a given INI entry. Unlike the [Update INI] section, this section replaces, adds, or deletes portions of a value in an entry rather than the whole value. The update-inifields-section name must appear in an UpdateIniFields entry in the [Install] section.

Any previous comments in the line are removed because they might not be applicable after changes. When looking in the INI file for fields in the line, spaces, tabs, and commas are used as field delimiters. However, a space is used as the separator when the new field is appended to the line.

[Add Registry] Section

Syntax 

[ add-registry-section ]
reg-root-string, [subkey], [value-name], [Flag], [value]

Adds subkeys or value names to the registry, optionally setting the value. The add-registry-section name must appear in an AddReg entry in the [Install] section.

[Delete Registry] Section

Syntax 

[ del-registry-section ]
reg-root-string, subkey, [value-name]

Deletes a subkey or value name from the registry. The del-registry-section name must appear in an DelReg entry in the [Install] section. This section can contain any number of entries. Each entry deletes one subkey or value name from the registry.

[Ini to Registry] Section

Syntax 

[ ini-to-registry-section ]
ini-file, ini-section, [ini-key], reg-root-string, subkey, flags 

Moves lines or sections from an INI file to the registry, creating or replacing an entry under the given key in the registry. The ini-to-registry-section name must appear in an Ini2Reg entry in the [Install] section.

[DestinationDirs] Section

Syntax 

[DestinationDirs]
file-list-section = ldid[**,**subdir ]
**DefaultDestDir=ldid[,**subdir ]

The [DestinationDirs] section defines the destination directories for the given [File-List] sections and optionally defines the default directory for any [File-List] sections that are not explicitly named.

file-list section 

Name of a [File-List] section. This name must have been defined in a Copyfiles, RenFiles, or DelFiles entry in the [Install] section.

Ldid 

Windows setup, installation and back-up destination directories. The following table presents possible names, values, and the use of the directories for LDIDS.

LDID Information

Name of LDID

Value

Directory use

LDID_SRCPATH

1

Source of temporary installation setup directory used by setup, this is only valid during regular install and contains the INF and other binary files. May be read-only location.

LDID_SETUPTEMP

2

Temporary setup directory for install path to uninstall location, this is where we backup files that will be overwritten.

LDID_UNINSTALL

3

Uninstall (backup) directory path for the copy engine.

LDID_BACKUP

4

BUGBUG: backup directory for the copy engine, not used temporary setup directory used by setup, this is only valid during regular install and is guaranteed to be a read/write location for scratch space.

LDID_SETUPSCRATCH

5

Temporary setup directory for scratch space.

 
 
 

Windows destination directories of the installation

LDID_WIN

10

Destination \Windows directory (just user files).

LDID_SYS

11

Destination \Windows System directory.

LDID_IOS

12

Destination \Windows Iosubsys directory.

LDID_CMD

13

Destination \Windows Command (DOS) directory.

LDID_CPL

14

Destination \Windows Control Panel directory.

LDID_PRINT

15

Destination \Windows Printer directory.

LDID_MAIL

16

Destination \Mail directory.

LDID_INF

17

Destination \Windows *INF directory.

LDID_HELP

18

Destination \Windows Help directory.

LDID_FONTS

20

Destination \Windows Font directory.

LDID_VIEWERS

21

Destination \Windows Viewers directory.

LDID_VMM32

22

Destination \Windows VMM32 directory.

LDID_COLOR

23

Destination \Windows Color directory.

LDID_APPS

24

Applications folder location. Shared directories for net install.

Boot and old Windows and DOS directories 

LDID

Value

Directory use

LDID_WINBOOT

26

Guaranteed boot device for windows.

LDID_MACHINE

27

Machine specific files.

LDID_HOST_WINBOOT

28

Boot and old \Windows and DOS directories.

LDID_BOOT

30

Root directory of boot drive.

LDID_BOOT_HOST

31

Root directory of boot drive host.

LDID_OLD_WINBOOT

32

Subdirectory off of Root (optional).

LDID_OLD_WIN

33

Old \Windows directory (if it exists).

LDID_OLD_DOS

34

Old \DOS directory (if it exists).

LDID_OLD_NET

35

Old network root directory, only valid during network GenUpgrade.

LDID_MOUSE

36

Path to MOUSE env. variable if set or same as LDID_WIN only valid after mouse class installer.

Variable LDIDs 

Variable LDIDs (VarLDIDs) allow for INFs to reliably find the existing Program Files, Accessories, etc., locations.

Directories that have long file names or that may have extended characters in their names may have multiple LDIDs. For example, 28700 and 28701 both point to "Program Files", but 28700 corresponds to the short file name "Progra~1" while 28701 corresponds to the long file name. Likewise, 28700 and 28702 both point to the short name "Progra~1", but 28700 renders this name in the OEM character set whereas 28702 renders it in ANSI characters. Different LDIDs are appropriate for different uses. In general, OEM/SFN LDIDs are uses for file copying, ANSI/LFN are used for strings written to the registry, and ANSI/SFN are used for Setup.ini entries that create start menu shortcuts.

The flag values at the end of the VarLDID.LFN and VarLDID.SFN sections show how the directories are represented internally as strings. The flag values have the following meanings:

0 = OEM/SFN (Default)
1 = ANSI/SFN
2 = OEM/LFN
3 = ANSI/LFN

subdir 

Name of the directory, within the directory named by ldid, to be the destination directory.

The optional DefaultDestDir entry provides a default destination for any Copyfile entries that use the direct copy notation (@filename) or any [File-List] section not specified in the [DestinationDirs] section. If DefaultDestDir is not given, the default directory is set to LDID_WIN.

This example sets the destination directory for the MoveMiniPort section to the \Windows Iosubsys directory, and sets the default directory for other sections to be the \BIN directory on the boot drive:

[DestinationDirs]
MoveMiniPort=12
; Destination for MoveMiniPort Section is windows\iosubsys
DefaultDestDirs=30,bin ; Direct copies go to Boot:\bin

[File-List] Section

A [File-List] section lists the names of files to be copied, renamed, or deleted. Entries in this section have three forms, depending on the type of entry in the [Install] section that defines the section name. In addition, the file-list-section name must appear in the CopyFiles entry.

A [File-List] section for a CopyFiles entry has this form:

[file-list] section
destination-file-name,[source-file-name],[temporary-file-name]

destination-file-name 

Name of the destination file. If no source file name is given, this is also the name of the source file.

source-file-name 

Name of the source file. Required only if the source and destination names are not the same.

temporary-file-name 

Name of the temporary file for the copy. Setup copies the source file, but gives it the temporary file name. The next time Windows 98 starts, it renames the temporary file to the destination file name. This is useful for copying files to a destination that is currently open or in use by Windows.

The following example copies three files:

[CopyTheseFilesSec]
file11 ; copies file11
file21, file22, file23 ; copies file22, temporarily naming it file23
file31,file32 ; copies file32 to file31

A [File-List] section for a RenFiles entry has this form:

[file-list-section]
new-file-name,old-file-name 

The file-list-section name must appear in the RenFiles entry.

This example renames the files FILE42, FILE52, and FILE62 to FILE41, FILE51, and FILE61, respectively:

[RenameOldFilesSec]
file41,file42
file51,file52
file61,file62

A [File-List] section for a DelFiles entry has this form:

[file-list-section]
filename 

The file-list-section name must appear in the DelFiles entry.

This example deletes three files:

[DeleteOldFilesSec]
file1
file2
file3

In the preceding examples, the given file names are assumed to have been defined in the [SourceDisksFiles] section and the logical disk numbers that appear in this section have been defined in the [SourceDisksNames] section.

[SourceDisksFiles] Section

Syntax 

[SourceDisksFiles]
filename = disk-number

Names the source files used during installation and identifies the source disks that contain the files. The ordinal of the source disk defined in disk-number must be defined in the [SourceDiskNames] section.

This example identifies a single source file, SRS01.386, on the disk having ordinal 1:

[SourceDisksFiles]
SRS01.386 = 1

[SourceDisksNames] Section

Syntax 

SourceDisksNames]
disk-ordinal ="disk-description",disk-label,disk-serial-number 

Identifies and names the disks used for installation of the given device drivers.

This example identifies one source disk and assigns it ordinal 1. The disk description is given as a strings key:

[SourceDisksNames]
1 = %ID1%, Instd1, 0000-0000

[ClassInstall] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[ClassInstall]
Copyfiles= file-list-section[**,**file-list-section]...
**Renfiles=file-list-section[,**file-list-section]...
**Delfiles=file-list-section[,**file-list-section]...
**UpdateInis=update-ini-section[,**update-ini-section]...
**UpdateIniFields=update-inifields-section[,**update-inifield-section]...
**AddReg=add-registry-section[,**add-registry-section]...
**DelReg=del-registry-section[,**del-registry-section]...

The [ClassInstall] section installs a new class for a device in the [Class] section of the registry. Every device installed in Windows 98 has a class associated with it (even if the class is "UNKNOWN"), and every class has a class installer associated with it. Setup processes this section if one of the devices defined in this INF file is about to be installed and the class is not already defined. Not all entries are needed or required.

The following example specifies the class entry for Setup to create in the registry (AddReg=SampleClassReg), and specifies a normal [Install] section in [SampleClassReg]. In this example, the Class description is required, and the relative key (HKR) denotes the class section. This example creates the class Sample and registers the description, installer, and icon for the class:

[ClassInstall]
Addreg=SampleClassReg
CopyFiles=@Sample.cpl

[SampleClassReg]
HKR,,,,%SampleClassDesc%
HKR,,Installer,,Sample.cpl
HKR,,Icon,HEX,00,00

[Strings] Section

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

Syntax 

[Strings]
strings-key**=**value

The [Strings] section defines one or more strings keys. A strings key is a name that represents a string of printable characters. Although the [Strings] section is generally the last section in the INF files, a strings key defined in this section may be used anywhere in the INF file that the corresponding string would be used.

Setup expands the strings key to the given string and uses it for further processing. Using a strings key requires that it be enclosed in percent signs (%). The [Strings] section makes localization easier by placing all localizable text in the INF file in a single section. Strings keys should be used whenever possible.

strings-key 

A unique name consisting of letters and digits.

value 

A string consisting of letters, digits, or other printable characters. It should be enclosed in quotation marks if the corresponding strings key is used in an entry that requires quotation marks.

The following example shows the [Strings] section for a sample INF file.

[Strings]
MSFT="Microsoft"
M1="APEX DRIVERS"
DevDesc1=APEX DRIVERS SCSI II Host Adapter
ID1="APEX DRIVERS SuperSCSI Installation disk"

Sample INF File

Cc768164.spacer(en-us,TechNet.10).gif Cc768164.spacer(en-us,TechNet.10).gif

This example assumes a fictitious piece of hardware, a SCSI II Host Adapter built by a company named Apex Drivers. The board requires four I/O ports that can be based at 180H, 190H, 1A0h, or 1B0h. The board requires one exclusive IRQ chosen from 4,5,9,10, or 11. The board can use a DMA channel if one is assigned.

;SCSI.INF
;
; Standard comment

[Version]
Signature="$Chicago$"
Provider=%MSFT%
HardwareClass=SCSIAdapter

[Manufacturer]
%M1%=APEXD ; Strings key for this manufacturer

[APEXD]
%DevDesc1% = SuperSCSI, *PNPA000, *PnPA001

[SuperSCSI]
; Apex Drivers Model 01 - SuperSCSI+
Log_Config = With_Dma, WithoutDMA
Copyfiles=MoveMiniPort, @SRSutil.exe
AddReg=MOD1

[With_DMA]
; Primary Logical Configuration
ConfigPriority = NORMAL
I/OConfig = 4@180-1B3%fff0(3:0:)
; Allocate 4 ports at base 180,190,1A0 or 1B0, device decodes
; 10bits of I/O address and uses no Aliases.
IRQConfig = 4,5,9,10,11 ; Allocate Exclusive IRQ 4, 5, 9, 10 or 11
DMAConfig = 0,1,2,3 ; Allocate DMA Channel 0, 1 ,2 or 3

[Without_DMA]
; Secondary Logical Configuration
ConfigPriority = SUBOPTIMAL
I/OConfig = 4@180-1B3%fff0(3:0:)
IRQConfig = 4,5,9,10,11

[MOD1]
HKR,,DevLoader,,I/OS
HKR,,Miniport,,SRSmini.386
[DestinationDirs]
MoveMiniPort=12
; Destination for MoveMiniPort Section is windows\iosubsys
DefaultDestDirs=30,bin ; Direct copies go to Boot:\bin

[SourceDiskSFiles]
SRS01.386 = 1

[SourceDisksNames]
1 = %ID1%, Instd1, 0000-0000

[MoveMiniPort]
SRS01.386

[Strings]
MSFT="Microsoft"
M1="APEX DRIVERS"
DevDesc1=Apex Drivers SCSI II Host Adapter
ID1="Apex Drivers SuperSCSI Installation disk"

Cc768164.spacer(en-us,TechNet.10).gif