[ClassInstall32] |
[ClassInstall32.nt] |
[ClassInstall32.ntx86] |
[ClassInstall32.ntia64]
AddReg=add-registry-section[, add-registry-section] ...
[Copyfiles=@filename | file-list-section[, file-list-section] ...]
[DelReg=del-registry-section[, del-registry-section] ...]
[Delfiles=file-list section[, file-list-section] ...]
[Renfiles=file-list-section[, file-list-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]...]
A ClassInstall32 section installs a new device setup class (and possibly a class installer) for devices of the new type.
For more information, see INF AddReg Directive.
System-supplied INF files for device setup classes (and class installers) do not use this directive in this section.
For more information, see INF CopyFiles Directive.
However, if a particular {SetupClassGUID} subkey exists in the registry ..Class branch, the system setup code subsequently ignores the ClassInstall32 section of any INF that specifies the same GUID value in its Version section. Consequently, an INF cannot replace an existing class installer or modify its behavior from a ClassInstall32 section. To modify the behavior of existing class installer, use a class-specific co-installer.
For more information, see INF DelReg Directive.
For more information, see INF DelFiles Directive.
For more information, see INF RenFiles 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 UpdateIniFields Directive.
An INF for devices in a system-supplied device setup class should not specify a ClassInstall32 section. (You can provide class-specific or device-specific co-installers to supplement system-supplied class installers or the system's device installer. For more information, see Writing a Co-installer.)
Usually, a ClassInstall32 section will have one or more AddReg directives to add entries under a system-provided SetupClassGUID subkey in the registry. These entries can include a class-specific "friendly name," class installer path, class icon, property page provider, and so forth.
Except for AddReg and CopyFiles, the other directives shown here are very seldom used in a ClassInstall32 section.
The system processes the ClassInstall32 section of an INF for a new device setup class when a device is about to be installed but the SetupClassGUID value of that device's class is not predefined by the system. (See Device Setup Classes for a list of the system-defined setup class names and GUIDs.)
To support a multiplatform distribution of driver files, construct platform-specific ClassInstall32 sections. For example, all system setup API functions that process a ClassInstall32 section will search first for a ClassInstall32.ntx86 section on an NT-based x86 platform and only look at an undecorated ClassInstall32 section if they cannot find a ClassInstall32.ntx86 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. Note that the ClassInstall32 section name is also used for installations on 64-bit platforms.
In the registry, every device installed on Windows 2000 and later platforms is associated with a device setup class. If the INF for a device to be installed is not associated with a new device class installer, or if its ClassGUID= specification in the Version section does not match a system-defined setup class GUID, that device's registry subkey is created under ..Class\{UnknownClassGUID}.
The INF for any device class installer typically has an AddReg directive in its ClassInstall32 section, to define at least one named section that creates a friendly name for its kind of device. The setup code automatically creates a SetupClassGUID subkey in the registry from the value supplied for the ClassGUID= entry in the INF's Version section when the first device of that (new) setup class is installed.
Under this SetupClassGUID subkey, such an INF also provides registry information for Models-specific subkeys, using additional AddReg directives in its per-manufacturer, per-models DDInstall sections. In addition, the INF can use the add-registry sections referenced in its ClassInstall32 section to specify a property-page provider and to exert control over how its class of devices is handled in the user interface.
Such a class-specific add-registry section has the following general form:
[SetupClassAddReg]
HKR,,,,%DevClassName% ; device-class friendly name
[HKR,,Installer32,,"class-installer.dll,class-entry-point"]
[HKR,,EnumPropPages32,,"prop-provider.dll,provider-entry-point"]
HKR,,Icon,,"icon-number"
[HKR,,SilentInstall,,1]
[HKR,,NoInstallClass,,1]
[HKR,,NoDisplayClass,,1]
The system uses the specified icon to represent your installer to the user.
Setting the predefined SilentInstall, NoDisplayClass, and NoInstallClass Boolean value entries in a class-specific registry key has the following effects:
If a class-specific installer requires the machine to be rebooted for any device that it installs, the class-specific add-registry section in its INF cannot have this value entry.
A ClassInstall32 section can contain AddReg directives to set the DeviceType, DeviceCharacteristics, and Security for devices of its setup class. See the INF AddReg Directive for more information.
This example shows the ClassInstall32 section, along with the named section it references with the AddReg directive, of the INF for the system display class installer.
[ClassInstall32] AddReg=display_class_addreg [display_class_addreg] HKR,,,,%DisplayClassName% HKR,,Installer32,,"Desk.Cpl,DisplayClassInstaller" HKR,,Icon,,"-1"
By contrast, this example shows the add-registry section referenced in the system CD-ROM INF's ClassInstall32 section. It sets up a class-specific property-page provider for the CD-ROM devices/drivers that it installs. This INF also sets the SilentInstall and NoInstallClass value entries in the CD-ROM class key to TRUE (1).
[cdrom_class_addreg] HKR,,,,%CDClassName% HKR,,EnumPropPages32,,"SysSetup.Dll,CdromPropPageProvider" HKR,,SilentInstall,,1 HKR,,NoInstallClass,,1 HKR,,Icon,,"101"
AddReg, BitReg, CopyFiles, DDInstall, DelFiles, DelReg, Ini2Reg, Models, RenFiles, SetupDiBuildClassInfoListEx, UpdateIniFields, UpdateInis, Version