INF 指令摘要 - Windows drivers

以下列表汇总了 INF 文件中可以使用的许多(但不是全部)指令。 INF 指令名称不区分大小写。 For example, Addreg, addReg, and AddReg are equally valid as directive specifications within an INF file.

本部分首先列出最常用的指令,以及它们的对等或相关指令。 最不常用的指令位于列表末尾。

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 directive resides determines the default, relative registry location that will receive modifications specified in the referenced add-registry-section. 这些默认注册表位置通常是特定于设备或驱动程序的子项。

Additional add-registry-sections can set up registry information 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, or for driver services.

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.

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.

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.

DelReg Directive

Note If you are building a universal or "Windows Driver" driver package, this directive is not valid. 请参阅使用通用 INF 文件。

This directive references one or more del-registry-sections used to remove obsolete subkeys and/or value entries from the registry. 例如,此类部分可能会出现在升级以前安装的 INF 中。

DelFiles Directive

Note If you are building a universal or "Windows Driver" driver package, this directive is not valid. 请参阅使用通用 INF 文件。

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

DelService Directive

Note If you are building a universal or "Windows Driver" driver package, this directive is not valid. 请参阅使用通用 INF 文件。

此指令很少使用,它会删除先前安装的服务。

LogConfig Directive

Note If you are building a universal or "Windows Driver" driver package, this directive is not valid. 请参阅使用通用 INF 文件。

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. 例如,手动安装的非 PnP ISA、EISA 和 MCA 设备的 INF 文件使用此指令。 (另请参阅 INF DDInstall.LogConfigOverride 部分。)