INF DDInstall.Services Section


[install-section-name.Services] |
[install-section-name.nt.Services] |
[install-section-name.ntx86.Services] |
[install-section-name.ntia64.Services] |  (Windows XP and later versions of Windows)
[install-section-name.ntamd64.Services]  (Windows XP 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]...] 

Description

Each per-ModelsDDInstall.Services section contains one or more INF AddService directives that reference additional INF-writer-defined sections in an INF file.

These INF files use the DDInstall.Services section with at least one AddService directive to control how and when the services of a particular driver are loaded, any dependencies on other services or on underlying (legacy) drivers it might have, and so forth. Optionally, they set up event-logging services by the device drivers as well.

Entries

AddService=ServiceName,[flags],service-install-section
                                      [,event-log-install-section[,[EventLogType][,EventName]]]...]

This directive references an INF-writer-defined service-install-section and, possibly, an event-log-install-section elsewhere in the INF file for the drivers of the devices covered by this DDInstall section. For more information, see INF AddService Directive.

DelService=ServiceName[,[flags][,[EventLogType][,EventName]]]...

This directive removes a previously installed service from the target computer. This directive is very rarely used. For more information, see INF DelService Directive.

Include=filename.inf[,filename2.inf]...

This optional entry specifies one or more additional system-supplied INF files that contain sections needed to install this device. If this entry is specified, usually so is a Needs entry.

For more information about the Include entry and restrictions on its use, see Specifying the Source and Target Locations for Device Files.

Needs=inf-section-name[,inf-section-name]...

This optional entry specifies the section that must be processed during the installation of this device. Typically, the section is a DDInstall.Services section within a system-supplied INF file that is listed in an Include entry. However, it can be any section that is referenced within a DDInstall.Services section.

Needs entries cannot be nested. For more information about the Needs entry and restrictions on its use, see Specifying the Source and Target Locations for Device Files.

Remarks

DDInstall.Services sections should have the same platform and operating system decorations as their related DDInstall sections. For example, an install-section-name.ntx86 section would have a corresponding install-section-name.ntx86.Services section.

The specified DDInstall section must be referenced in a device/models-specific entry under the per-manufacturer Models section of the INF file. The case-insensitive extensions to the install-section-name shown in the formal syntax statement can be inserted into such a DDInstall.Services section name in cross-platform INF files.

For more information about how to use the system-defined .nt, .ntx86, .ntia64, and .ntamd64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.

Examples

This example shows the DDInstall.Services section for the Ser_Inst section shown as an example for the INF DDInstall section.


[Ser_Inst.Services]
AddService=sermouse, 0x00000002, sermouse_Service_Inst,\
                sermouse_EventLog_Inst 
;
; flags value in preceding entry indicates function driver of device
; 
AddService = mouclass,, mouclass_Service_Inst, mouclass_EventLog_Inst 

; entries in the following xxx_Inst sections omitted here for brevity,
; but fully specified as the example for the AddService directive
;
[sermouse_Service_Inst]
; ...

[sermouse_EventLog_Inst]
; ...

[mouclass_Service_Inst]
; ...

[mouclass_EventLog_Inst]
; ...

This example shows the install-section-name.NT.Services section and its service-install-sections in the INF file for the system-supplied WDM audio device/driver shown as an example for the INF DDInstall section.


[WDMPNPB003_Device.NT.Services]
AddService = wdmaud,0x00000000,wdmaud_Service_Inst
AddService = swmidi,0x00000000,swmidi_Service_Inst
AddService = sb16,  0x00000002,sndblst_Service_Inst

[wdmaud_Service_Inst]
DisplayName   = %wdmaud.SvcDesc% ; friendly name (see Strings)
ServiceType   = 1                ; SERVICE_KERNEL_DRIVER
StartType     = 1                ; SERVICE_SYSTEM_START
ErrorControl  = 1                ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\system32\drivers\wdmaud.sys

[swmidi_Service_Inst]
DisplayName   = %swmidi.SvcDesc% 
ServiceType   = 1 
StartType     = 1 
ErrorControl  = 1 
ServiceBinary = %10%\system32\drivers\swmidi.sys

[sndblst_Service_Inst]
DisplayName   = %sndblst.SvcDesc% 
ServiceType   = 1 
StartType     = 1 
ErrorControl  = 1 
ServiceBinary = %10%\system32\drivers\mssb16.sys

[Strings] ; only immediately preceding %strkey% tokens shown here
%wdmaud.SvcDesc%="Microsoft WDM Virtual Wave Driver (WDM)"
%swmidi.SvcDesc%="Microsoft Software Synthesizer (WDM)"
%sndblst.SvcDesc%="WDM Sample Driver for SB16"

See INF DDInstall.HW Section for more examples of DDInstall.Services sections with some service-install-sections referenced by the AddService directive. This includes one for a PnP filter driver.

See also

AddService
DDInstall
DDInstall.HW
DelService
Models

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft