Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX ServiceControl Stop a service on uninstall, but don't start it on install

I need the service to stop and be removed on its uninstall, but I don't want it to start on install. The problem is, the start attribute on the ServiceControl element does not provide an option to disable starting. Or am I just missing it?

I'm using this for my service control element:

<ServiceControl Id="StartService"
    Start="install"
    Stop="both"
    Remove="uninstall"
    Name="Remec.AteService"
    Wait="yes" />
like image 428
Jonn Avatar asked Jan 04 '11 02:01

Jonn


2 Answers

As per the documentation, the start attribute is optional, so simply omit it entirely.

 <ServiceControl Id="StartService"
    Stop="both"
    Remove="uninstall"
    Name="Remec.AteService"
    Wait="yes" />
like image 76
saschabeaumont Avatar answered Nov 05 '22 04:11

saschabeaumont


Leave out the Start attribute.

like image 5
Brian Walker Avatar answered Nov 05 '22 03:11

Brian Walker