Windows 95 Device Information Files Overview

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 Windows 95.

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 95 INF files to find the values to be provided in MSBATCH.INF. The general format is also used for statements in the [Install] section of MSBATCH.INF.

Device information (INF) files provide information used by Windows 95 to install software that supports a given hardware device. When hardware manufactures 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 95.

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.

On This Page

General INF File Format
[Version] Section
[Manufacturer] Section
[Manufacturer Name] Section
[Install] Section
[ClassInstall] Section
[Strings] Section
Sample INF File

General INF File Format

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 identfied 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.

Miscellaneous control section

Specifies how a device is handled by the Windows 95 user interface.

[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 starts 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 95 INF files, see the Win32 Software Development Kit for Windows 95 and Windows NT.

[Version] Section

Syntax

[Version]

Signature="$Windows 95$"
Class= class-name
Provider =INF_creator

LayoutFile= filename.inf

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

class-name

Defines the class in the Registry for any device installed from this INF. The following are some examples of class names:

Adapter
Cdrom
Display
EISADevices
fdc

hdc
Keyboard
MCADevices
Media
Modem

Monitor
Mouse
MTD
NetNetService
Nodriver

PCMCIA
Ports
Printer
SCSIAdapter
System

filename.inf

Names the INF file that contains the layout information (source disks and files) required for installing this driver software. Typically, for Windows 95 components, this is LAYOUT.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="$WINDOWS 95$"
Provider=%MSFT%
Class=Adapter
LayoutFile=LAYOUT.INF

[Manufacturer] Section

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 double 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

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

Syntax

[ install-section-name ]

LogConfig = log-config-section-name[**,**log-config-section-name]...
**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-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
Reboot | Restart

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.

The Reboot or Restart entries can be added to the [Install] section to force the system to either restart or to reboot the machine after performing the commands in the [Install] section.

This example shows a typical [Install] section. It contains a LogConfig entry that identifies two logical configuration sections for this device. It also contains Copyfiles and AddReg entries that identify the sections containing information about which files to install.

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

The CopyFiles entry provides a special notation that allows 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 information about LDID values, see "[Update INI] Section" later in this appendix.

[Update Config] Section

Syntax

[ update-config-section ]

DevRename= current-dev-name,new-dev-name
**DevDelete=**device-driver-name
**DevAddDev=driver-name,configkeyword[,flag][,**param-string]
**Stacks=**dos-stacks-values
**Buffers=**legal-dos-buffer-value
**Files=**legal-dos-files-value
**LastDrive=**legal-dos-lastdrive-value

The [Update Config] 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.

[Update INI] Section

Syntax

[ update-ini-section ]

ini-file, ini-section, [old-ini-entry], [new-ini-entry], [flags]
.
.
.

Replaces, deletes, or adds entries in the given INI file. This is similar to the INF support in Windows 3.1. The update-ini-section name must appear in an UpdateInis entry in the [Install] section. The optional action flags can be one of these values:

0

Default. Matches Value of old-ini-entry Key, ignores its value. If Key is present, replaces with new-ini-entry. If old-ini-entry is NULL, the new-ini-entry is added unconditionally. If new-ini-entry is NULL, the old-ini-entry is deleted.

1

Matches both Key and Value of old-ini-entry. Update is done only if both Key and Value match.

2

Conditional and matches only the Key of old-ini-entry. If Key in old-ini-entry already exists, do not replace with new-ini-entry.

3

Conditional and matches both Key and Value of old-ini-entry. If the Key=Value of old-ini-entry exists, do not replace with new-ini-entry.

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 filename.

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

A logical disk identifier (LDID). Can be one of these values:

00

Null LDID; this LDID can be used to create a new LDID

01

Source drive:\ pathname

02

Temporary Setup directory; this is valid only during Windows 95 Setup

03

Uninstall directory

04

Backup directory

10

Windows directory

11

SYSTEM directory

12

IOSUBSYS directory

13

COMMAND directory

14

Control Panel directory

15

Printers directory

16

Workgroup directory

17

INF directory

18

Help directory

19

Administration

20

Fonts

21

Viewers

22

VMN32

23

Color directory

25

Shared directory

26

Winboot

27

Machine specific

28

Host Winboot

30

Root directory of the boot drive

31

Root directory for host drive of a virtual boot drive

32

Old Windows directory if it exists

33

Old MS-DOS directory if it exists

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.

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

[file-list-section]

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

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

destination-file-name

Name of the destination file. If no source filename 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 filename. The next time Windows 95 starts, it renames the temporary file to the destination filename. 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 filenames 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

Syntax

[ClassInstall]

Copyfiles= file-list-section[**,**file-list-section]...
**AddReg=add-registry-section[,**add-registry-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 95 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

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 double quotation marks if the corresponding strings key is used in an entry that requires double 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

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="$WINDOWS 95$"
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"