INF ClassInstall32.Services 部分

注意

如果要生成通用或 Windows 驱动程序包,则本部分无效。 请参阅在 Windows 驱动程序中使用通用 INF 文件和入门。

ClassInstall32 部分为新类中的设备安装新的设备安装程序类。

[ClassInstall32.Services] | 
[ClassInstall32.nt.Services] | 
[ClassInstall32.ntx86.Services] | 
[ClassInstall32.ntia64.Services] |  (Windows XP and later versions of Windows)
[ClassInstall32.ntamd64.Services]  (Windows XP and later versions of Windows)
[ClassInstall32.ntarm.Services] | (Windows 8 and later versions of Windows)
[ClassInstall32.ntarm64.Services] | (Windows 10 version 1709 and later versions of Windows)

AddService=ServiceName,[flags],service-install-section
                             [,event-log-install-section[,[EventLogType][,EventName]]]...
[DelService=ServiceName[,[flags][,[EventLogType][,EventName]]]...]
[Include=filename.inf[,filename2.inf]...]
[Needs=inf-section-name[,inf-section-name]...]

每个 ClassInstall32.Services 节都包含一个或多个 INF AddService 指令,这些指令 引用 INF 文件中其他 INF 编写器定义的部分。

INF 文件通常使用具有至少一个 AddService 指令的 ClassInstall32.Services 部分来控制加载特定设备类的服务的方式和时间,以及它可能对其他服务具有的任何依赖项,等等。 (可选)他们还可以为设备类设置事件日志记录服务。

AddService=ServiceName,[flags],service-install-section[,event-log-install-section[,[EventLogType][,EventName]]]...
对于 ClassInstall32 部分涵盖的设备类的驱动程序,此指令引用 INF 编写器定义的 service-install-section,并可能引用 INF 文件中的其他位置的 event-log-install-section。 有关详细信息,请参阅 INF AddService 指令

DelService=ServiceName[,[flags][,[EventLogType][,EventName]]]...
此指令从目标计算机中删除以前安装的服务。 此指令很少使用。 有关详细信息,请参阅 INF DelService 指令

Include=filenameinf[,filename2.inf]...
此可选条目指定一个或多个系统提供的命名 INF 文件,其中包含安装此设备类所需的部分。 如果指定了此项,则通常为 “需要 ”条目。

Needs=inf-section-name[,inf-section-name]...
此可选条目指定在安装此设备类期间必须处理的特定命名节。 通常,此类命名节是系统提供的 INF 文件中的 ClassInstall32.Services 节,在 Include 条目中列出。 但是,它可以是此类 ClassInstall32.Services 节中引用的任何部分。

注解

ClassInstall32.Services 部分应具有与其相关的 ClassInstall32 节相同的平台和操作系统修饰。 例如, ClassInstall32.ntx86 节将具有相应的 ClassInstall32.ntx86.Services 节。

可以将不区分大小写的 .nt.ntx86.ntia64.ntamd64.ntarm.ntarm64 扩展插入到跨平台 INF 文件中的 ClassInstall32.Services 节名称中,如正式语法语句所示。 有关详细信息,请参阅 为多个平台和操作系统创建 INF 文件

另请参阅

ClassInstall32

AddService

DDInstall

DDInstall。硬件

DelService

模型