[install-section-name.HW] |
[install-section-name.nt.HW] |
[install-section-name.ntx86.HW]
[install-section-name.ntia64.HW]
[AddReg=add-registry-section[, add-registry-section]...] ...
[Include=filename.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...]
[DelReg=del-registry-section[, del-registry-section]...] ...
[BitReg=bit-registry-section[,bit-registry-section] ...] ...
DDInstall.HW sections are typically used for installing multifunction devices, for installing PnP filter drivers, and for setting up any user-accessible device-specific but driver-independent information in the registry, whether with explicit AddReg directives or with Include and Needs entries.
Needs entries cannot be nested. (For further information on the Needs entry and restrictions on its use, see Specifying the Source and Target Locations for Device Files).
This directive is rarely used, except in an INF file that upgrades a previous installation of the same devices/models listed in the per-manufacturer per-Models section that defined the name of this DDInstall section. For more information, see INF DelReg Directive.
The case-insensitive extensions to the install-section-name shown in the formal syntax statement can be inserted into such a DDInstall.HW section name in cross-platform and dual-OS INF files. For information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.
Any DDInstall.HW section either must have an AddReg directive or must Include another INF file and reference a section in the corresponding Needs entry that sets up the necessary registry information.
Each directive in a DDInstall.HW section can reference more than one INF-writer-defined section, but each additional named section must be separated from the next with a comma (,). Each such section name must be unique within the INF and must follow the general rules for defining section names. These rules are described in General Syntax Rules for INF Files.
For more information about installing multifunction devices, Supporting Multifunction Devices.
This example shows how the CD-ROM device class installer uses DDInstall.HW sections and DDInstall.Services sections to support both CD audio and changer functionality by creating the appropriate registry sections, and setting these up as PnP upper filter drivers.
;; ;; Installation section for cdaudio. Sets cdrom as the service ;; and adds cdaudio as a PnP upper filter driver. ;; [cdaudio_install] CopyFiles=cdaudio_copyfiles,cdrom_copyfiles [cdaudio_install.HW] AddReg=nosync_addreg,cdaudio_addreg ; cdaudio_addreg required to register this as a PnP filter driver [cdaudio_install.Services] AddService=cdrom,0x00000002,cdrom_ServiceInstallSection AddService=cdaudio,,cdaudio_ServiceInstallSection [changer_install] CopyFiles=changer_copyfiles,cdrom_copyfiles [changer_install.HW] AddReg=changer_addreg ; ... changer_install.Services section similar to cdaudio's ; ... some similar cdrom_install(.HW)/addreg sections omitted [cdaudio_addreg] ; changer_addreg section has similar entry HKR,,"UpperFilters",0x00010000,"cdaudio" ; REG_MULTI_SZ value ; ; Use next section to disable synchronous transfers to this device. ; Sync transfers will always be turned off by default in this INF ; for any cdrom-type device. ; [nosync_addreg] HKR,,"DefaultRequestFlags",0x00010001,8 [autorun_addreg] HKLM,"System\CurrentControlSet\Services\cdrom","AutoRun",0x00010003,1 ;; ;; service-install sections for cdrom, cdaudio, and changer ;; [cdrom_ServiceInstallSection] DisplayName = %cdrom_ServiceDesc% ServiceType = 1 StartType = 1 ErrorControl = 1 ServiceBinary = %12%\cdrom.sys LoadOrderGroup = SCSI CDROM Class AddReg = autorun_addreg [cdaudio_ServiceInstallSection] DisplayName = %cdaudio_ServiceDesc% ServiceType = 1 StartType = 1 ErrorControl = 1 ServiceBinary = %12%\cdaudio.sys ; ... changer_ServiceInstallSection similar to cdaudio's