📄 rp_infdef_keywords.html
字号:
[<B><A HREF="#KWD_CopyFiles">CopyFiles</A>=@</B><I>filename</I> | <I>file-list-section</I>[<B>,</B><I>file-list-section</I>] ...]<BR>
<B><A HREF="#KWD_AddReg">AddReg</A>=</B><I>add-registry-section</I>[<B>,</B><I>add-registry-section</I>]...<BR>
[<B><A HREF="#KWD_Include">Include</A>=</B><I>filename</I><B>.</B><I>inf</I>[<B>,</B><I>filename2</I><B>.</B><I>inf</I>]...]<BR>
[<B><A HREF="#KWD_Needs">Needs</A>=</B><I>inf-section-name</I>[<B>,</B><I>inf-section-name</I>]...]<BR>
[<B><A HREF="#KWD_DelFiles">Delfiles</A>=</B><I>file-list-section</I>[<B>,</B><I>file-list-section</I>]...]<BR>
[<B>Renfiles=</B><I>file-list-section</I>[<B>,</B><I>file-list-section</I>]...]<BR>
[<B>DelReg=</B><I>del-registry-section</I>[<B>,</B><I>del-registry-section</I>]...]<BR>
[<B>BitReg=</B><I>bit-registry-section</I>[<B>,</B><I>bit-registry-section</I>]...]<BR>
[<B>LogConfig=</B><I>log-config-section</I>[<B>,</B><I>log-config-section</I>]...]<BR>
[<B>ProfileItems=</B><I>profile-items-section</I>[<B>,</B><I>profile-items-section</I>]...]<BR>
[<B>UpdateInis=</B><I>update-ini-section</I>[<B>,</B><I>update-ini-section</I>]...]<BR>
[<B>UpdateIniFields=</B><I>update-inifields-section</I>[<B>,</B><I>update-inifields-section</I>]...]<BR>
[<B>Ini2Reg=</B><I>ini-to-registry-section</I>[<B>,</B><I>ini-to-registry-section</I>]...]<BR>
...</DD>
<P>Each per-Models <I>DDInstall</I> section contains an optional <B>DriverVer</B> entry and one or more directives referencing additional named sections in the INF file, shown here with the most commonly specified INF directives, <B>CopyFiles</B> and <B>AddReg</B>, listed first. The sections referenced by these directives contain instructions for installing driver files and writing any device-specific and/or driver-specific information into the registry. </P>
<DL>
<DT><B>Directives and Entries</B></DT>
<DT><B><P><A NAME=KWD_RenFiles>RenFiles</A>=</B><I>file-list-section</I>[<B>,</B><I>file-list-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections listing file(s) to be renamed on the destination before device-relevant source files are copied to the target machine. Typically, this directive is used only in INFs that upgrade a previous installation to "save" previously installed files on the target machine from being overwritten.</DD>
<DT><B><P><A NAME=KWD_DelReg>DelReg</A>=</B><I>del-registry-section</I>[<B>,</B><I>del-registry-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections in which keys and/or value entries are specified to be removed from the registry during installation of the device(s).
<P>Typically, this directive is used to handle upgrades when an INF must clean up old registry entries from a previous installation of this device. An <B>HKR</B> specification in such a delete-registry section designates the <B>..Class\</B><I>SetupClassGUID</I><B>\</B><I>device-instance-id</I> registry path to the user-accessible driver (a.k.a. "software" key).</DD>
<DT><B><P><A NAME=KWD_BitReg>BitReg</A>=</B><I>bit-registry-section</I>[<B>,</B><I>bit-registry-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections in which existing registry value entries of type REG_BINARY are modified. (See also <B>AddReg</B>.) An <B>HKR</B> specification in such a bit-registry section designates the <B>..Class\</B><I>SetupClassGUID</I><B>\</B><I>device-instance-id</I> registry path to the user-accessible driver (a.k.a. "software" key). </DD>
<DT><B><P><A NAME=KWD_LogConfig>LogConfig</A>=</B><I>log-config-section</I>[<B>,</B><I>log-config-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections within an INF for a root-enumerated device or for a manually installed device. In these named sections, the INF for such a "detected" or manually installed device specifies one or more logical configurations of bus-relative hardware resources that the device must have to be operational. The INF for such a manually installed device that is not software-configurable also should have a <I>DDInstall</I><B>.FactDef</B> section.
<P>The <B>LogConfig</B> directive is never used to install PnP peripheral devices, but, for more information about using a <I>DDInstall</I><B>.LogConfigOverride</B> section to override the hardware resource requirements reported by the underlying bus, see the reference for this directive later in this chapter.
<P>This directive is irrelevant to all higher level (nondevice) drivers and components.</DD>
<DT><B><P><A NAME=KWD_ProfileItems>ProfileItems</A>=</B><I>profile-items-section</I>[<B>,</B><I>profile-items-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections that describe items to be added to, or removed from, the Start menu.
<P>This directive is only supported on Windows 2000 platforms.</DD>
<DT><B><P><A NAME=KWD_UpdateIni>UpdateInis</A>=</B><I>update-ini-section</I>[<B>,</B><I>update-ini-section</I>]...</DT>
<DD>This rarely used directive references one or more INF-writer-defined sections, specifying a source INI file from which a particular section or line within such a section is to be read into a destination INI file of the same name during installation. Optionally, line-by-line modifications to an existing INI file on the destination from a given source INI file of the same name can be specified in the update-ini section.</DD>
<DT><B><P><A NAME=KWD_UpdateIniField>UpdateIniFields</A>=</B><I>update-inifields-section</I>[<B>,</B><I>update-inifields-section</I>]...</DT>
<DD>This rarely used directive references one or more INF-writer-defined sections in which modifications within the lines of a device-specific INI file are specified. </DD>
<DT><B><P><A NAME=KWD_Ini2Reg>Ini2Reg</A>=</B><I>ini-to-registry-section</I>[<B>,</B><I>ini-to-registry-section</I>]...</DT>
<DD>This rarely used directive references one or more INF-writer-defined sections in which sections or lines from a device-specific INI file, supplied on the source media, are to be moved into the registry. </DD>
<DT><B><P>See Also</B></DT>
<DD><B><A HREF="AC97SMPL.HTML#LP_DDINSTALL_SECT" TARGET="LP_INFSRC">[AC97SMPL]</A></B> section in the INF, <B><A HREF="RP_INFDEF_DDINSTALL.HTML">[<I>DDInstall</I>]</A></B> section described.</DD>
</DL>
</DL>
<DL>
<DT><P><BR><BR><B><A NAME=KWD_DDInstallInterfaces>
[<I>DDInstall</I>.Interfaces]</B> |<BR><B>
[<I>DDInstall</I>.nt.Interfaces]</B> | <BR><B>
[<I>DDInstall</I>.ntx86.Interfaces]</B> <BR> <BR>
<DD><B>AddInterface={</B><I>interfaceGUID</I><B>} </B>[<B>, </B>[<I>reference string</I>] [<B>,</B>[<I>add-interface-section</I>] [<B>,</B><I>flags</I>]]] ...</DD>
<DD>[<B><A HREF="#KWD_Include">Include</A>=</B><I>filename</I><B>.</B><I>inf</I>[<B>,</B><I>filename2</I><B>.</B><I>inf</I>]...]</DD>
<DD>[<B><A HREF="#KWD_Needs">Needs</A>=</B><I>inf-section-name</I>[<B>,</B><I>inf-section-name</I>]...]</DD>
<DD><P>Each per-Models <I>DDInstall</I><B>.Interfaces</B> section can have one or more <B>AddInterface</B> directives, depending on how many predefined device interfaces a particular device/driver supports and/or how many new (and compatible with existing) device interfaces the driver(s) of that device export for use by still higher level components.</DD>
<DD><P>To support existing device interfaces, such as any of the system's predefined kernel-streaming interfaces, specify the appropriate <I>interfaceGUID</I> value(s) in this section. To install a component, such as a class driver, that exports a whole new class of device interfaces, an INF also must have an <B>InterfaceInstall32</B> section.</DD>
<DD><P><B>Directives and Entries</B></DD>
<DL>
<DT><P><B><A NAME=KWD_AddInterface>
AddInterface
</A>={</B><I>interfaceGUID</I><B>}</B> [<B>,</B> [<I>reference string</I>] [<B>,</B>[<I>add-interface-section</I>] [<B>,</B><I>flags</I>]]] ...</DT>
<DD>This directive installs support for a device interface, designated by the given <I>interfaceGUID</I> value, that the device/driver exports to higher level components. Usually, it also references an INF-writer-defined <I>add-interface-section</I> elsewhere in the INF file.The <B>{</B><I>interfaceGUID</I><B>}</B> and/or (rarely specified) <I>reference-string</I> can be expressed as <B>%</B><I>strkey</I><B>%</B> tokens that are defined in a <B>Strings</B> section of the INF file. The INF of a PnP device function or filter driver usually omits the optional <I>reference string</I> entry unless that driver uses reference strings to discriminate between two interfaces of the same class for a single device. The <I>flags</I>, if specified, must be zero.
<P>An <I>add-interface-section</I> typically references an add-registry section that contains value entries to be stored in the registry about the interface(s) supported by the device/driver. An <B>HKR</B> specified in such an add-registry section designates the user-accessible device-interface subkey of the <B>..DeviceClasses\{</B><I>InterfaceClassGuid</I><B>}\</B> registry branch. In the Windows 2000 registry, <B>DeviceClasses</B> is a subkey of the <B>..CurrentControlSet\Control</B> key.
</DD>
<DD><I><P>See Also the </I><B><A HREF="RP_INFDEF_INTRFCS.HTML#KWD_AddInterface">AddInterface</A></B><I> entries in the INF.</I></DD>
<DT><B><P>See Also</B></DT>
<DD><B><A HREF="AC97SMPL.HTML#LP_INTRFCS_SECT" TARGET="LP_INFSRC">
[AC97SMPL.Interfaces]
</A></B>, <B><A HREF="AC97SMPL.HTML#LP_INTRFCSDEC_SECT" TARGET="LP_INFSRC">
[AC97SMPL.NTX86.Interfaces]
</A></B> sections in the INF, <B><A HREF="RP_INFDEF_INTRFCS.HTML">
[<I>DDInstall</I>.Interfaces]
</A></B> section described.</DD>
</DL>
</DL>
<DL>
<DT><P><BR><BR><B><A NAME=KWD_DDInstallServices>
[<I>DDInstall</I>.Services]</A></B> |<BR><B>
[<I>DDInstall</I>.nt.Services]</B> |<BR><B>
[<I>DDInstall</I>.ntx86.Services]</B> <BR> <BR>
<DD><B>AddService</A>=</B><I>ServiceName</I><B>,</B>[<I>flags</I>]<B>,</B><I>service-install-section</I>[<B>,</B><I>event-log-install-section</I>[<B>,</B>[<I>EventLogType</I>][<B>,</B><I>EventName</I>]]]...</DD>
<DD>[<B>DelService=</B><I>ServiceName</I>[<B>,</B>[<I>flags</I>][<B>,</B>[<I>EventLogType</I>][<B>,</B><I>EventName</I>]]]...</DD>
<DD>[<B><A HREF="#KWD_Include">Include</A>=</B><I>filename</I><B>.</B><I>inf</I>[<B>,</B><I>filename2</I><B>.</B><I>inf</I>]...]</DD>
<DD>[<B><A HREF="#KWD_Needs">Needs</A>=</B><I>inf-section-name</I>[<B>,</B><I>inf-section-name</I>]...]</DD>
<DD><P>Each per-<I>Models</I> <I>DDInstall</I><B>.Services</B> section contains one or more <B>AddService</B> directives referencing additional INF-writer-defined section(s) in a Windows 2000 INF file.</DD>
<DD><P>Windows 2000 INFs commonly use the <I>DDInstall</I><B>.Services</B> section with at least one <B>AddService</B> directive to control how and when the services of a particular driver are loaded, any dependencies on other services or on underlying (legacy) drivers it might have, and so forth. Optionally, they set up event-logging services by the device driver(s) as well. </DD>
<DD><I>DDInstall</I><B>.Services</B> sections should have the same platform and OS <A HREF="#KWD_DecoratedName">decoration</A>s as their related <I>DDInstall</I> sections. For example, a <I>DDInstall</I><B>.ntx86</B> section would have a corresponding <I>DDInstall</I><B>.ntx86.Services</B> section.</DD>
<DD>This section is irrelevant to exclusively Windows 9x installations. </DD>
<DD><P><B>Directives and Entries</B></DD>
<DL>
<DT><P><B><A NAME=KWD_AddService>AddService</A>=</B><I>ServiceName</I><B>,</B>[<I>flags</I>]<B>,</B><I>service-install-section</I>[<B>,</B><I>event-log-install-section</I>[<B>,</B>[<I>EventLogType</I>][<B>,</B><I>EventName</I>]]]...</DT>
<DD>This directive references an INF-writer-defined <I>service-install-section</I> and, possibly, an <I>event-log-install-section</I> elsewhere in the INF file for the driver(s) of the device(s) covered by this <I>DDInstall</I> section. </DD>
<DT><P><B><A NAME=KWD_DelService>DelService</A>=</B><I>ServiceName</I>[<B>,</B>[<I>flags</I>][<B>,</B>[<I>EventLogType</I>][<B>,</B><I>EventName</I>]]]...</DT>
<DD>This directive removes a previously installed service from the target machine. This directive is very rarely used, except possibly in an INF file that upgrades a previous installation of the same devices/models listed in the per-manufacturer per-<I>Models</I> section that defined the name of this <I>DDInstall</I> section. </DD>
<DT><P><B>See Also</B></DT>
<DD><B><A HREF="AC97SMPL.HTML#LP_SVC_SECT" TARGET="LP_INFSRC">[AC97SMPL.Services]</A></B>, <B><A HREF="AC97SMPL.HTML#LP_SVCDEC_SECT" TARGET="LP_INFSRC">[AC97SMPL.NTX86.Services]</A></B> sections in the INF, <B><A HREF="RP_INFDEF_SVCS.HTML">[<I>DDInstall</I>.Services]</A></B> section described.</DD>
</DL>
</DL>
<DL>
<DT><P><BR><BR><A NAME=KWD_DecoratedName><B><I>
Decorated name
</I></B></A></DT>
<DD>
<I>(or Decorated section name)</I>
An INF file section whose name contains a suffix that identifies a particular platform and/or OS. For example, [SourceDisksNames.x86] and [aha154x.ntx86] are examples of decorated sections. Decorated sections contain installation information that is only relevant to the platform and/or OS specified by the suffix.
</DD><P><BR><BR>
</DL>
<DL>
<DT><A NAME=KWD_DelFiles><B>
DelFiles
</A>=</B><I>file-list-section</I>[<B>,</B><I>file-list-section</I>]...</DT>
<DD>This directive references one or more INF-writer-defined sections listing file(s) on the target to be deleted. In general, this directive is used only in INFs that upgrade a previous device/driver installation to remove obsolete files from the target machine. </DD>
</DL>
<DL>
<DT><P><BR><BR><B><A NAME=KWD_DestDir>
[DestinationDirs]
</A></B></DT>
<DD><P>
[<B>DefaultDestDir=</B><I>dirid</I>[<B>,</B><I>subdir</I>]] <BR>
[<I>file</I>-<I>list</I>-<I>section</I><B>=</B><I>dirid</I>[<B>,</B><I>subdir</I>]] ... <BR></DD>
<DD><P>A <B>DestinationDirs</B> section specifies the target destination directory or directories for all copy, delete, and/or rename operations on files referenced by name elsewhere in the INF file. </DD>
<DD><P>This section is required in any INF that uses a <A HREF="#KWD_CopyFiles"><B>CopyFiles</B></A> directive or that references a <I>file-list-section</I>, whether with a <A HREF="#KWD_CopyFiles"><B>CopyFiles</B></A>, <A HREF="#KWD_DelFiles"><B>DelFiles</B></A>, or <B>RenFiles</B> directive. </DD>
<DD><P><B>Entry Values</B></DD>
<DL>
<DT><P><B>DefaultDestDir=</B><I>dirid</I>[<B>,</B><I>subdir</I>]] </DT>
<DD>Specifies the default destination directory for all copy, delete, and/or rename operations on files that are not explicitly listed in a <I>file-list-section</I> referenced by other entries here. </DD>
<DT><I>file-list-section</I></DT>
<DD>Specifies the INF-writer-determined name of a section referenced by a <B>CopyFiles</B>, <B>RenFiles</B>, or <B>DelFiles</B> directive elsewhere in the INF file. Such an entry is optional if this section has a <B>DefaultDestDir</B> entry and all copy-file operations specified in this INF have the same target destination. However, any <I>file-list-section</I> referenced by a <B>RenFiles</B> or <B>DelFiles</B> directive elsewhere in the INF must be listed here. </DD>
<DT><I>dirid</I></DT>
<DD>Specifies the directory identifier of the target directory for operations on files that are referenced by name, possibly within a named <I>file-list-section</I> of the INF.
<DD><BR>For instance :
<P>12 = Drivers directory; equivalent to <I>%windir%\system32\drivers</I> on Windows 2000 and to <I>%windir%\system\IOSubsys</I> on Win9x platforms.</TD>
<P>10 = Windows directory; equivalent to <I>%windir%</I> on both platforms.
<P>See the Reference/Setup/INF DestinationDirs section in the Windows 2000 DDK for a complete list of these values.
<DL>
<DT><P><B>See Also</B></DT>
<DD><B><A HREF="AC97SMPL.HTML#LP_DESTDIR_SECT" TARGET="LP_INFSRC">[DestinationDirs]</A></B> section in the INF, <B><A HREF="RP_INFDEF_DESTDIR.HTML">[DestinationDirs]</A></B> section described.</DD>
</DL>
</DL>
</DL>
<DL>
<DT><P><BR><BR><A NAME=KWD_DevSetupClass><B>
Device setup classes
</B></A></DT>
<DD>Devices that follow similar installation procedures are grouped in device setup classes. Microsoft defines setup classes for most of the devices. IHVs and OEMs can create their own new classes only if the none of the current set of classes apply. A GUID is associated with each class; the GUIDs of the system-defined device setup classes are defined in <I>devguid.h</I> and have the symbolic names of the form GUID_DEVCLASS_xxx.
<P>For instance, this is the class that includes the Audio and DVD multimedia devices, joystick ports, and full-motion video-capture devices.</DD>
<DL>
<DT><P>Multimedia</DT>
<DD>Class = Media</DD>
<DD>ClassGuid = {4d36e96c-e325-11ce-bfc1-08002be10318}</DD>
</DL>
</DL>
<DL>
<DT><P><BR><BR><B><A NAME=KWD_DriverVer>
DriverVer</A>=</B><I>mm/dd/yyyy</I>[<B>,</B><I>x.y.v.z</I>]
</DT>
<DD>This optional entry specifies version information for the driver package.
<P>The <I>mm/dd/yyyy</I> value specifies the date of the driver package, including the driver files and the INF. This date should be the most recent date of any file in the driver package. A hyphen (-) can be used as the date field separator in place of the slash (/).
<P>The <I>x.y.v.z</I> specifies an optional version number. This value is for display purposes only (for example, in the Device Manager). The OS does not use this value for driver selection.
<P>When the OS searches for drivers, it chooses a driver with a more recent <B>DriverVer</B> date over a driver with an earlier date. If an INF has no <B>DriverVer</B> entry or is unsigned, the OS applies the default date of 00/00/0000.
<P>A Windows 2000 INF should have a <B>DriverVer</B> entry in its <B>Version</B> section and/or in the individual <I>DDInstall</I> sections. If there is a <B>DriverVer</B> entry in a <I>DDInstall</I> section, the OS uses that entry instead of the one in the <B>Version</B> section for that particular device.
<P>Windows 98 does not recognize a <B>DriverVer</B> entry in the <B>Version</B> section. Therefore, an INF that will be used on Windows 98 should have <B>DriverVer</B> entries in the undecorated <I>DDInstall</I> sections that are used by Windows 98.
</DD>
<DL>
<DT><P><B>See Also</B></DT>
<DD><B><A HREF="AC97SMPL.HTML#LP_DRVVER_DEF" TARGET="LP_INFSRC">DriverVer</A></B> entry in the INF.</DD>
</DL>
</DL>
<!!!>
<!!! E !!!>
<!!!>
<H3><P><BR><BR><A NAME=E> E </A></H3>
<DL>
<dt><b><A NAME=KWD_ExcludeId>
ExcludeID</A></b>=<i>device-identification-string</i>[<b>,</b><i>device-identification-string</i>]...</dt>
<dd>(<i>Windows XP and later</i>.) This directive specifies one or more
device identification strings (either hardware IDs or compatible IDs). The <i>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -