Service Install Section
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. See the Win32 SDK online documentation for more information.
-
start-code
-
Specifies when to start the driver. One of the following:
-
SERVICE_BOOT_START (0x0)
-
Indicates a driver started by the operating system loader. This code should
only be used for drivers that are essential to loading the OS.
-
SERVICE_SYSTEM_START (0x1)
-
Indicates a driver started during OS initialization.
-
SERVICE_AUTO_START (0x2)
-
Indicates a driver started by the Service Control Manager during system
startup.
-
SERVICE_DEMAND_START (0x3)
-
Indicates a driver started on demand by the Service Control Manager.
-
SERVICE_DISABLED (0x4)
-
Indicates a driver that cannot be started.
-
error-control-level
-
Specifies the level of error control as follows:
-
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 initialize, startup proceeds. No warning is
displayed.
-
path-to-service
-
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. For
detailed discussion of load order groups and controlling load order, see
Chapter 1.
-
+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. For detailed discussion of load order groups and controlling load
order, see Chapter 1.
-
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