原文链接:http://msdn.microsoft.com/en-us/library/windows/hardware/ff546335(v=vs.85).aspx
INF ClassInstall32 Section的形式如下:
[ClassInstall32] | [ClassInstall32.nt] | [ClassInstall32.ntx86] | [ClassInstall32.ntia64] | (Windows XP and later versions of Windows) [ClassInstall32.ntamd64] (Windows XP and later versions of Windows) AddReg=add-registry-section[,add-registry-section]... [AddProperty=add-property-section[,add-property-section] ...] (Windows Vista and later versions of Windows) [Copyfiles=@filename | file-list-section[,file-list-section]...] [DelReg=del-registry-section[,del-registry-section]...] [DelProperty=del-property-section[,del-property-section] ...] (Windows Vista and later versions of Windows) [Delfiles=file-listsection[,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]...]
描述:ClassInstall32是为一个新设备类(devieces in new class)创建一个新设备安装类(device setup class)。
AddReg=add-registry-section[,add-registry-section] ...
应用若干个修改系统注册表的区域,通常给要创建的新设备安装类(device setup class)一个好名字,便于以后从注册表中读取其值,然后对
其对应的新设备(devieces in new class)进行操作。更多详情请看: INF AddReg Directive
AddProperty=add-property-section[,add-property-section] ...
Vista和以后的Windows系列才有该域值。用以修改设备安装类(device setup class)的属性( device properties )值。更多详情请查看:
INF AddProperty directive 和 Using the INF AddProperty Directive and the INF DelProperty Directive。
Copyfiles=@filename | file-list-section[,file-list-section] ...
指定一个命名文件从源目录复制到目的目录上,或者引用若干个域(Section),在域(Section)中与类相关的源文件被传送到目的目录下。在DestinationDirs
域中(DestinationDirs section)中的DefaultDestDir 项中指定了目的目录。更多详情请看:INF CopyFiles Directive.
DelReg=del-registry-section[,del-registry-section] ...
与前面的AddReg项相反,该项的功能是在安装过程中删除系统注册表中对应的值。详情请看:INF DelReg Directive.
DelProperty=del-property-section[,del-property-section] ...
与前面的AddProperty功能相反,在Vista和以后的Windows系列才有该域。在安装过程中删除一个属性值。详情请看:INF DelProperty directive 。
Delfiles=file-listsection[,file-list-section] ...
指定在安装过程中需要删除的文件。更多详情请看:INF DelFiles Directive。
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]...
基本上不会用到这些项。
总结:
ClassInstall32 Section的功能是向系统注册一个全新的设备安装类(device setup class),不能用该域(Section)来修改已自定义的和系统预定义的各种类。
实际上,除了AddReg项和Copefiles项外,其他项很少会用到。