Service Install
The Service Install section installs the service listed in the AddService entry of the Services section:
[install-section-name_ServiceInstallSection]
DisplayName=[name]
ServiceType=type-code
StartType=start-code
ErrorControl=error-control-level
ServiceBinary=path-to-service
LoadOrderGroup=[load-order-group-name]
Dependencies=+depend-on-group-name[[,depend-on-service-name]...]
StartName=[driver-object-name]
-
name
-
Optional. A friendly name for the service.
-
type-code
-
Specifies the type of driver. This can be any type allowed by the CreateService function.
-
start-code
-
Specifies when to start the driver. This parameter can be one of the following values:
-
SERVICE_BOOT_START (0x0)
-
Indicates a driver started by the operating system loader. Use this code only for drivers essential to loading the operating system.
-
SERVICE_SYSTEM_START (0x1)
-
Indicates a driver started during system initialization.
-
SERVICE_AUTO_START (0x2)
-
Indicates a driver started by the Service Control Manager during system startup.
-
SERVICE_DEMAND_START (0x3)
-
Indicates a driver that the Service Control Manager starts on demand.
-
SERVICE_DISABLED (0x4)
-
Indicates a driver that cannot be started.
-
error-control-level
-
Specifies the level of error control. This parameter can be one of the following values:
-
CRITICAL (0x3)
-
If the driver fails to load, fail the attempted startup. If the startup is not using the LastKnownGood control set, switch to LastKnownGood. If the startup attempt is using LastKnownGood, run a bug-check routine.
-
SEVERE (0x2)
-
If the startup is not using the LastKnownGood control set, switch to LastKnownGood. If the startup attempt is using LastKnownGood, continue on in case of error.
-
NORMAL (0x1)
-
If the driver fails to load or initialize, startup should proceed, but display a warning.
-
IGNORE (0x0)
-
If the driver fails to load or intialize, startup proceeds. No warning is displayed.
-
path
-
The path to the binary for the service.
-
load-order-group-name
-
Optional. Identifies the load order group of which this driver is a member. Examples of groups are: pointer, port, primary disk, and so forth.
-
+depend-on-group-name
-
Optional. Specifies a load order group on which the driver depends. The driver is started only if at least one member of the specified group has been started.
-
depend-on-service-name
-
Optional. Specifies a service that must be running before this driver is started.
-
driver-object-name
-
Optional. If type-code specifies a Kernel driver or a file system driver, this name is the Windows NT driver object name that the I/O Manager uses to load the device driver.
The following example shows a typical Service Install section:
[mouclass_Service_Inst]
DisplayName = %mouclass.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\mouclass.sys
LoadOrderGroup = Pointer Class
See Also
Overview, INF File Format Reference