[install-section-name.CoInstallers] |
[install-section-name.nt.CoInstallers] |
[install-section-name.ntx86.CoInstallers]
[install-section-name.ntia64.CoInstallers]
AddReg=add-registry-section[, add-registry-section]...
CopyFiles=@filename | file-list-section[,file-list-section]...
[Include=filename.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...]
[DelFiles=file-list-section[,file-list-section]...]
[RenFiles=file-list-section[,file-list-section]...]
[DelReg=del-registry-section[, del-registry-section]...]
[BitReg=bit-registry-section[,bit-registry-section]...]
[UpdateInis=update-ini-section[,update-ini-section]...]
[UpdateIniFields=update-inifields-section[,update-inifields-section]...]
[Ini2Reg=ini-to-registry-section[,ini-to-registry-section]...]
...
This optional section registers one or more device-specific co-installers supplied on the distribution media to supplement the operations of existing device class installers.
An HKR specified in such an add-registry section designates the ..Class\SetupClassGUID\device-instance-id registry path to the user-accessible driver (a.k.a. "software") key. Thus, for a device-specific co-installer, it writes (or modifies) a CoInstallers32 value entry in this user-accessible per-device/driver "software" subkey.
For a class-specific co-installer, it registers the new co-installers by modifying the contents of the appropriate ..CoDeviceInstallers\SetupClassGUID subkeys. The path to the appropriate registry SetupClassGUID subkeys must be explicitly specified in the referenced add-registry sections.
For more information, see INF AddReg Directive.
However, system INF files that install co-installers never use this directive in a DDInstall.CoInstallers section.
For more information, see INF CopyFiles Directive.
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.)
For more information, see INF DelFiles Directive.
For more information, see INF RenFiles Directive.
For more information, see INF DelReg Directive.
For more information, see INF BitReg Directive.
For more information, see INF UpdateInis Directive.
For more information, see INF UpdateIniFields Directive.
For more information, see INF Ini2Reg Directive.
The given DDInstall section must be referenced in a device/models-specific entry under the per-manufacturer Models section of the INF file.
If an INF includes a DDInstall.Coinstallers section, there must be one for each platform-decorated and undecorated DDInstall section. For example, if an INF contains an [install-section-name.ntx86] section and an [install-section-name] section and it registers device-specific co-installers, then the INF must include both an [install-section-name.ntx86.Coinstallers] section and an [install-section-name.Coinstallers] section. For more information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems. Co-installers are not supported on Windows 9x platforms.
Each directive in a DDInstall.CoInstallers section can reference more than one INF-writer-defined section name, but each additional named section must be separated from the next with a comma (,). Each directive-created 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.
A co-installer is a Win32 DLL that typically writes additional configuration information to the registry or performs other installation tasks that require dynamically generated, machine-specific information that is not available when an INF is created. A device-specific co-installer supplements the installation operations either of the OS's device installer or of the appropriate class installer when that device is installed.
For more information about writing and using co-installers, Writing a Co-Installer.
All co-installer files must be copied into the %windir%\system32 directory. Like any INF CopyFiles operation, the destination is controlled explicitly for a named file-list-section in the DestinationDirs section of the INF file by the dirid value 11 or by supplying this dirid value for the DefaultDestDir entry.
Registering one or more device-specific co-installers requires adding a REG_MULTI_SZ-typed value entry to the registry. Specify an add-registry-section referenced by the AddReg directive, using the following general form:
[DDInstall.CoInstallers_DeviceAddReg]
HKR,,CoInstallers32,0x00010000,"DevSpecificCoInstall.dll
[,DevSpecificEntryPoint]"[,"DevSpecific2CoInstall.dll
[,DevSpecific2EntryPoint]"...]
The HKR entry appears as a single line within the INF file, and each supplied device-specific co-installer DLL must have a unique name. After the listed co-installers have been registered, the system's device installer calls them at each subsequent step of the installation process for that device.
If the optional DevSpecificEntryPoint is omitted, the default CoDeviceInstall routine name is used as the entry point of the co-installer DLL.
For additional information, see Registering a Device-Specific Co-Installer.
To add a value entry (and setup-class subkey, if it does not exist already) for one or more device-class co-installers to the registry, an add-registry-section referenced by the AddReg directive has the following general form:
[DDInstall.CoInstallers_ClassAddReg]
HKLM,System\CurrentControlSet\Control
\CoDeviceInstallers,{SetupClassGUID},
0x00010008,"DevClssCoInst.dll[,DevClssEntryPoint]"
...
Each entry in such an add-registry section appears as a single line within the INF file, and each supplied class co-installer DLL must have a unique name. If the supplied co-installers should be used for more than one device setup class, this add-registry section can have more than one entry, each with the appropriate SetupClassGUID value.
Such a supplemental device-class co-installer must not replace any already registered co-installers for an existing class installer, so it must have a unique name and the REG_MULTI_SZ-type value supplied must be appended (as indicated by the 8 in the flags value 0x0010008) to the class-specific co-installer entries, if any, already present in the {SetupClassGUID} subkey. However, the OS setup functions will never append a duplicate DevClssCoInstall.dll to a value entry if a co-installer of the same name is already registered.
The INF for a supplemental device-class co-installer can be activated by a right-click install or through a custom setup application's call to SetupInstallFromInfSection.
This example shows the DDInstall.CoInstallers section for IrDA serial network cards. The system-supplied INF for these IrDA (serial) NICs supplies a co-installer to the system IrDA class installer.
; DDInstall section [PNP.NT] AddReg=ISIR.reg, Generic.reg, Serial.reg PromptForPort=0 ; This is handled by IRCLASS.DLL LowerFilters=SERIAL ; This is handled by IRCLASS.DLL BusType=14 Characteristics=0x4 ; NCF_PHYSICAL ; ... PNP.NT.Services section omitted here [PNP.NT.CoInstallers] AddReg = ISIR.CoInstallers.reg ; ... [IRSIR.reg] HKR, Ndi, HelpText, 0, %IRSIR.Help% HKR, Ndi, Service, 0, "IRSIR" HKR, Ndi\Interfaces, DefUpper, 0, "ndisirda" HKR, Ndi\Interfaces, DefLower, 0, "nolower" HKR, Ndi\Interfaces, UpperRange, 0, "ndisirda" HKR, Ndi\Interfaces, LowerRange, 0, "nolower" [Generic.reg] HKR,,InfraredTransceiverType,0,"0" [Serial.reg] HKR,,SerialBased,0, "0" [ISIR.CoInstallers.reg] HKR,,CoInstallers32,0x00010000,"IRCLASS.dll,IrSIRClassCoInstaller" ; ... Services and Event Log registry sections omitted here [Strings] ; ... IRSIR.Help = "An IrDA serial infrared device is a built-in COM port or external transceiver which transmits infrared pulses. This NDIS miniport driver installs as a network adapter and binds to the FastIR protocol."
The preceding PNP.NT.CoInstallers section only referenced a co-installer-specific add-registry section. It has no CopyFiles directive because this system-supplied INF installs a set of IrDA network devices and, like all system INF files, uses the LayoutFile entry in its Version section to transfer the co-installer file to the destination. However, any DDInstall.CoInstallers section in an INF supplied by an IHV or OEM also would have a CopyFiles directive, along with SourceDisksNames and SourceDisksFiles sections.
AddReg, BitReg, CopyFiles, DDInstall, DelFiles, DelReg, DestinationDirs, Ini2Reg, RenFiles, SourceDisksFiles, SourceDisksNames, UpdateIniFields, UpdateInis, Version