INF Directives

This section describes the syntax of the directives that can appear within the sections of INF files. The following topics provide detailed information about the INF directives, and are listed in alphabetical order.

In this section

TopicDescription

INF AddInterface Directive

One or more AddInterface directives can be specified within an INF DDInstall.Interfaces section. This directive installs device-specific support for device interface classes exported to higher level components, such as other drivers or applications. The directive typically references an add-interface-section , which sets up registry information for the device-specific instance of the device interface class.

INF AddPowerSetting Directive

An AddPowerSetting directive references one or more sections that are used to modify or create power setting information. Each add-power-setting-section defines a power setting, the allowed values for the power setting, the friendly name of the power setting, and the description of the power setting. An add-power-setting-section also specifies the default value for each power scheme personality. For more information about power settings and power scheme personalities, see Managing Device Performance States.

INF AddProperty Directive

An AddProperty directive references one or more INF file sections that modify the device properties that are set for a device instance, a device setup class, a device interface class, or a device interface.

INF AddReg Directive

An AddReg directive references one or more INF-writer-defined add-registry-sections that are used to modify or create registry information.

INF AddService Directive

Note  This directive is not used in INF files that install devices that do not require any drivers, such as modems or display monitors.

An AddService directive is used within an INF DDInstall.Services section or INF DefaultInstall.Services section. It specifies characteristics of the services associated with drivers, such as how and when the services are loaded, and any dependencies on other underlying legacy drivers or services. Optionally, this directive also sets up event-logging services for the device.

INF BitReg Directive

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

A BitReg directive references one or more INF-writer-defined sections used to set or clear bits within an existing REG_BINARY-type value entry in the registry. However, this directive is very rarely used in device/driver INF files.

INF CopyFiles Directive

A CopyFiles directive can do either of the following:

  • Cause a single file to be copied from the source media to the default destination directory.
  • Reference one or more INF-writer-defined sections in the INF that each specifies a list of files to be copied from the source media to the destination.

INF CopyINF Directive

A CopyINF directive causes specified INF files to be copied to the target system. The CopyINF directive is supported in Windows XP and later versions of Windows.

INF DelFiles Directive

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

A DelFiles directive references an INF-writer-defined section elsewhere in the INF file, and causes that list of files to be deleted in the context of operations on the section in which the referring DelFiles directive is specified.

INF DelProperty Directive

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

A DelProperty directive references one or more INF file sections that delete device properties for a device instance, a device setup class, a device interface class, or a device interface.

INF DelReg Directive

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

A DelReg directive references one or more INF-writer-defined sections describing keys and/or value entries to be removed from the registry.

INF DelService Directive

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

A DelService directive is used in a DDInstall.Services section to remove one or more previously installed device/driver services from the target computer.

INF DriverVer Directive

A DriverVer directive specifies version information for drivers installed by this INF.

INF FeatureScore Directive

The FeatureScore directive provides an additional ranking criterion for drivers based on the features that a driver supports. For example, feature scores might be defined for a device setup class that distinguishes between drivers that are based on class-specific criteria.

INF HardwareId Directive

Note  The HardwareId directive is only supported within an Autorun.inf file. This directive must not be used within the INF files that are used for PnP device installations.

Starting with Windows Vista, the Found New Hardware Wizard and Hardware Update Wizard support INF HardwareId directives in the [DeviceInstall] section of an Autorun.inf file. The author of Autorun.inf can use these HardwareId directives to specify Plug and Play (PnP) hardware identifiers (IDs) of the devices for which the AutoRun-enabled application provides and installs drivers.

INF Ini2Reg Directive

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

An Ini2Reg directive references one or more named sections in which lines or sections from a supplied INI file are moved into the registry. This creates or replaces one or more value entries under a specified key.

INF LogConfig Directive

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

A LogConfig directive references one or more INF-writer-defined sections, each of which specifies a logical configuration of hardware resources − the interrupt request lines, memory ranges, I/O ports, and DMA channels that can be used by the device. Each log-config-section specifies an alternative set of bus-relative hardware resources that can be used by the device.

INF ProfileItems Directive

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

A ProfileItems directive is used in an INF DDInstall section to list one or more profile-items-sections that contain items or groups to be added to, or removed from, the Start menu.

INF RegisterDlls Directive

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

A RegisterDlls directive references one or more INF sections used to specify files that are OLE controls and require self-registration.

INF RenFiles Directive

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

A RenFiles directive references an INF-writer-defined section elsewhere in the INF file, which causes that list of files to be renamed in the context of operations on the section in which the referring RenFiles directive is specified.

INF UnregisterDlls Directive

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

An UnregisterDlls directive references one or more INF sections used to specify files that are OLE controls and require self-unregistration (self-removal).

INF UpdateIniFields Directive

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

An UpdateIniFields directive references one or more named sections in which fine-grained modifications within the lines of an INI file can be specified.

INF UpdateInis Directive

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

An UpdateInis directive references one or more named sections, specifying an INI file from which a particular section or line is to be read and applied to an existing INI file of the same name on the target computer. Optionally, line-by-line modifications from and to such INI files can be specified in the update-ini-section.

 

For more information about the syntax rules for INF directives, see General Syntax Rules for INF Files.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft