Summary of INF Directives
The following list summarizes many (but not all) of the directives that can be used in INF files. INF directive names are case-insensitive. For example, Addreg, addReg, and AddReg are equally valid as directive specifications within an INF file.
This section lists the most commonly used directives first, together with their reciprocal or related directives. The most rarely used directives are toward the end of the list.
This directive references one or more add-registry-sections, which are INF sections used to add or modify subkeys and value entries in the registry.
The particular INF section in which an AddReg (or DelReg) directive resides determines the default, relative registry location that will receive modifications specified in the referenced add-registry-section (or delete-registry-section). These default registry locations are typically device-specific or driver-specific subkeys somewhere under the HKEY_LOCAL_MACHINE registry tree. For more information, see Registry Trees and Keys for Devices and Drivers.
Additional add-registry-sections can set up registry information for vendor-supplied co-installers, for system-defined device interfaces (such as kernel streaming interfaces) exported to higher level drivers, for new device interfaces exported by an installed component for a given class of devices, for driver services, or (rarely) for a new setup class of devices if the INF has a ClassInstall32 section.
This directive references one or more del-registry-sections used to remove obsolete subkeys and/or value entries from the registry. For example, such a section might appear in an INF that upgrades a previous installation.
This directive references one or more file-list-sections specifying transfers of model/device-specific driver images and any other necessary files from the distribution media to the destination directory for each such file. Alternatively, this directive can specify a single file to be copied from the distribution media to the default destination directory.
This rarely used directive references one or more file-list-sections specifying files to be deleted from the target of the installation.
This rarely used directive references one or more file-list-sections specifying INF-associated source files to be renamed on the destination.
This directive references at least a service-install-section, possibly with an additional event-log-install-section.
INF files for most kinds of devices (those that install drivers) have an INF-writer-defined service-install-section to specify any dependencies on system-supplied drivers or services, during which stage of the system initialization process the supplied drivers should be loaded, and so forth. Many INF files for device drivers also have an INF-writer-defined event-log-install-section that is referenced by the AddService directive to set up event logging by the device driver.
This rarely used directive deletes a previously installed service.
This directive references an add-interface-section in which one or more AddReg directives are specified referencing sections that set up the registry entries for the device interfaces supported by this device/driver. Optionally, such an add-interface-section can reference one or more additional sections that specify delete-registry, file-transfer, file-delete, and/or file-rename operations.
This rarely used directive references one or more bit-registry-sections specifying existing REG_BINARY-type value entries in the registry for which particular bits in the values are to be modified.
This directive references one or more log-config-sections that specify acceptable bus-relative and device-specific hardware configurations in an INF for devices that are detected (by PnP device enumerators) or manually installed. For example, INF files for non-PnP ISA, EISA, and MCA devices, which are manually installed, use this directive. (Also see INF DDInstall.LogConfigOverride Section.)
This rarely used directive references one or more update-ini-sections specifying parts of a supplied INI file to be read during installation and, possibly specifying line-by-line modifications to be made in that INI file.
This rarely used directive references one or more update-inifields-sections specifying modifications to be made on fields within the lines of an INI file.
This rarely used directive references one or more ini-to-registry-sections specifying lines or sections of an INI file to be written into the registry.
The sections under which any of the directives in the previous list can be specified is system-determined. The basic form of each directive is shown in the formal syntax of the reference for each section, as for example:
[DDInstall] | [DDInstall.HW] | [DDInstall.CoInstallers] | [ClassInstall32] | [ClassInstall32.ntx86] | [ClassInstall32.ntia64] | [ClassInstall32.ntamd64] AddReg=add-registry-section[,add-registry-section] ...
The rest of this section describes the formal syntax and meaning for each system-defined named section, standard INF-writer-defined section, and directives that can be specified in an INF file.