By using system-defined extensions to INF file sections and directives, you can create a single INF file for cross-platform installations and/or for dual-OS installations. The extensions enable you to create decorated section names. For INF DDInstall sections and related directives, these decorations (.ntx86, .ntia64, or .nt) specify which sections and directives are relevant to each platform and operating system. You can create an INF file that installs a device only on x86 platforms, only on ia64 platforms, on all platforms supported by Windows NT4.0 and later, on all platforms supported by Windows 9x/Me, or on all platforms for all operating systems.
For example, if your device supports Windows 2000 and later platforms, and Windows 9x/Me platforms, you would create an INF file with two or more "parallel" DDInstall sections that have the following extensions to control what is installed on each platform and/or for each operating system:
Undecorated sections are also fallback sections for Windows NT4.0 and later platforms. Setup uses undecorated sections on Windows NT4.0 and later platforms if it cannot locate the appropriate decorated sections. However, to prevent these sections from being used on Windows 9x/Me by mistake, you should decorate any Windows NT4.0-specific or later DDInstall and related sections with the .ntx86, .ntia64, or .nt extensions.
Windows Setup processes these DDInstall sections as follows:
An INF file containing INF DDInstall sections with platform extensions can also contain additional per-device sections,such as the required DDInstall.Services and optional DDInstall.HW, DDInstall.CoInstallers, DDInstall.LogConfigOverride, and/or DDInstall.Interfaces sections. In dual-OS and/or cross-platform INF files, you should specify the appropriate extension immediately following the INF-writer-defined section name as, for example, install-section-name.ntx86.HW.
If a dual-OS INF file contains decorated install-section-name.nt, install-section-name.ntx86, or install-section-name.ntia64 sections, it must also have additional parallel decorated and undecorated per-device sections. That is, if the INF file has both install-section-name and install-section-name.nt sections and it has a DDInstall.HW section, it also must have a parallel install-section-name.nt.HW section (if the device or driver requires a .HW section for Windows NT4.0 and later).
The INF File Sections and Directives documentation shows these extensions as part of the formal syntax statements in the appropriate section references as, for example:
[install-section-name.HW] |
[install-section-name.nt.HW] |
[install-section-name.ntx86.HW] |
[install-section-name.ntia64.HW]
Such a formal syntax statement indicates that these extensions are valid alternatives to the basic section. It does not indicate that any INF with a install-section-name.nt.HW section must also have every other platform-specific install-section-name.ntxxx.HW section. You can use any subset of these extensions to specify the decorated sections required for a particular cross-platform or dual-OS installation.
INF files that contain install-section-name platform extensions can also include platform extensions with their INF SourceDisksNames section and INF SourceDisksFiles section entries, to specify installation file locations in a platform-specific manner.
For Windows XP and later, you can supply INF Models sections that are specific to various versions of the operating system. These version-specific Models sections are identified using the TargetOSVersion decoration in an INF Manufacturer section.
To find out how to organize driver files on distribution media when the driver targets multiple operating system versions, see Creating Directories for Driver Distribution Media.