ServiceControl Table

The ServiceControl table is used to control installed or uninstalled services.

Note   Services that rely on the presence of an assembly in the Global Assembly Cache (GAC) cannot be installed or started using the ServiceInstall and ServiceControl tables. If you need to start a service that depends on an assembly in the GAC, you must use a custom action sequenced after the InstallFinalize action or a commit custom action. For information about installing assemblies to the GAC see Installation of Assemblies to the Global Assembly Cache.

The ServiceControl table has the following columns.

ColumnTypeKeyNullable
ServiceControl Identifier YN
Name Formatted NN
Event Integer NN
Arguments Formatted NY
Wait Integer NY
Component_ Identifier NN

 

Columns

ServiceControl

This is the primary key of this table.

Name

This column is the string naming the service. This column can be used to control a service that is not installed.

Event

This column contains the operations to be performed on the named service. Note that when stopping a service, all services that depend on that service are also stopped. When deleting a service that is running, the installer stops the service.

The values in this field are bit fields that can be combined into a single value that represents several operations.

The following values are only used during an installation.

ConstantHexadecimalDecimalDescription
msidbServiceControlEventStart0x0011Starts the service during the StartServices action.
msidbServiceControlEventStop0x0022Stops the service during the StopServices action.
(none)0x0044<reserved>
msidbServiceControlEventDelete0x0088Deletes the service during the DeleteServices action.

 

The following values are only used during an uninstall.

ConstantHexadecimalDecimalDescription
msidbServiceControlEventUninstallStart0x01016Starts the service during the StartServices action.
msidbServiceControlEventUninstallStop0x02032Stops the service during the StopServices action.
(none)0x04064<reserved>
msidbServiceControlEventUninstallDelete0x080128Deletes the service during the DeleteServices action.

 

Arguments

A list of arguments for starting services. The arguments are separated by null characters [~]. For example, the list of arguments One, Two, and Three are listed as: One[~]Two[~]Three.

Wait

Leaving this field null or entering a value of 1 causes the installer to wait a maximum of 30 seconds for the service to complete before proceeding. The wait can be used to allow additional time for a critical event to return a failure error. A value of 0 in this field means to wait only until the service control manager (SCM) reports that this service is in a pending state before continuing with the installation.

Component_

External key to column one of the Component Table.

Remarks

The StartServices, StopServices, and DeleteServices actions in sequence tables process the information in this table. For information about using sequence tables, see Using a Sequence Table.

Use the Name column to start, stop, or delete services that are being replaced by the installation or that are dependent upon a new service that is being installed. For example, entering MyService into the ServiceControl column can tie this service to MyComponent in the Component_ column. If the bit field in the Event column is set for start while installing, then the installer starts MyService when installing MyComponent.

Validation

ICE03
ICE06
ICE32
ICE45
ICE46
ICE69

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.