ServiceControl Element

Windows Installer XML (WiX) v3.0

ServiceControl Element

Description
Starts, stops, and removes services for parent Component. This element is used to control the state of a service installed by the MSI or MSM file by using the start, stop and remove attributes. For example, Start='install' Stop='both' Remove='uninstall' would mean: start the service on install, remove the service when the product is uninstalled, and stop the service both on install and uninstall.
Windows Installer references
ServiceControl Table
Parents
Component
Inner Text
None
Children
Sequence (min: 1, max: 1)
  1. ServiceArgument (min: 0, max: unbounded): Ordered list of arguments used when modifying services.
Attributes
Name Type Description Required
Id String   Yes
Name String Name of the service. Yes
Remove Enumeration Specifies whether the service should be removed on install, uninstall or both. This attribute's value must be one of the following:
install
The service will be deleted by the DeleteServices action during install.
uninstall
The service will be deleted by the DeleteServices action during uninstall.
both
The service will be deleted by the DeleteServices action during install and uninstall.
 
Start Enumeration Specifies whether the service should be started on install, uninstall or both. This attribute's value must be one of the following:
install
The service will be started by the StartServices action during install.
uninstall
The service will be started by the StartServices action during uninstall.
both
The service will be started by the StartServices action during install and uninstall.
 
Stop Enumeration Specifies whether the service should be stopped on install, uninstall or both. This attribute's value must be one of the following:
install
The service will be stopped by the StopServices action during install.
uninstall
The service will be stopped by the StopServices action during uninstall.
both
The service will be stopped by the StopServices action during install and uninstall.
 
Wait YesNoType Specifies whether or not to wait for the service to complete before continuing.  
See Also
Wix Schema