Export (0) Print
Expand All

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.

AddReg Directive

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.

DelReg Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

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.

CopyFiles Directive

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.

DelFiles Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

This rarely used directive references one or more file-list-sections specifying files to be deleted from the target of the installation.

RenFiles Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

This rarely used directive references one or more file-list-sections specifying INF-associated source files to be renamed on the destination.

AddService Directive

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.

DelService Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

This rarely used directive deletes a previously installed service.

AddInterface Directive

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.

BitReg Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

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.

LogConfig Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

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

UpdateInis Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

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.

UpdateIniFields Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF 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.

Ini2Reg Directive
Note  If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF 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.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft