I am trying to set a pre-installed service's startup type to Automatic
, using WiX. Another task was to start the service on install, which I achieved with:
<ServiceControl
Id="ServiceRunningState"
Name="[Service Name]"
Start="install"
Stop="install"
Wait="yes" />
Now I would also like to set the startup type. I have tried the following (see answer):
<ServiceConfig
Id="ServiceStartup"
ServiceName="[Service Name]"
DelayedAutoStart="yes"
OnInstall="yes"
OnReinstall="yes" />
But this didn't change the startup type of the service (tested from Manual
startup type). And besides, I want the startup type to be Automatic
, not Automatic (Delayed Start)
.
Please note that I am trying to modify an existing service, so there is no ServiceInstall
element.
The two elements (ServiceControl
and ServiceConfig
) are children within a Component
parent element.
Any help is appreciated :)