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.
This is the primary key of this table.
This column is the string naming the service. This column can be used to control a service that is not installed.
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.
Constant Hexadecimal Decimal Description msidbServiceControlEventStart 0x001 1 Starts the service during the StartServices action. msidbServiceControlEventStop 0x002 2 Stops the service during the StopServices action. (none) 0x004 4 <reserved> msidbServiceControlEventDelete 0x008 8 Deletes the service during the DeleteServices action.
The following values are only used during an uninstall.
Constant Hexadecimal Decimal Description msidbServiceControlEventUninstallStart 0x010 16 Starts the service during the StartServices action. msidbServiceControlEventUninstallStop 0x020 32 Stops the service during the StopServices action. (none) 0x040 64 <reserved> msidbServiceControlEventUninstallDelete 0x080 128 Deletes the service during the DeleteServices action.
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.
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.
External key to column one of the Component 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.
Build date: 11/30/2012