I am trying to create a WIX installer that will install a Windows Service. For the Windows service, I create a service exactly how it's outlined http://tech.pro/tutorial/895/creating-a-simple-windows-service-in-csharp.
In my wxs installer file, I have the following markup specified -
<Component Id="MyCompanyWindowsServiceComponent" Guid="*">
<File Id="MyCompanyWindowsServiceFile" Name="SimpleWindowsService.exe" DiskId="1"
Source="..\SimpleWindowsService\bin\debug\SimpleWindowsService.exe"/>
<ServiceInstall Id="MyCompanyServiceInstall" Type="ownProcess" Vital="yes"
Name="MyCompany:MyProduct"
DisplayName="MyCompany:MyProduct"
Description="MyCompany Windows Service"
Start="auto"
Account="LocalSystem"
ErrorControl="critical"
Interactive="yes"/>
<ServiceControl Id="StartService"
Start="install"
Stop="both"
Remove="uninstall"
Name="MyCompany:MyProduct"
Wait="no"/>
</Component>
and I have the component referenced like -
<Feature Id="Complete" Level="1">
::
<ComponentRef Id="MyCompanyWindowsServiceComponent"/>
</Feature>
When I finally run my installer, I see the file has been copied to the right location but the service itself hasn't been started.
What am I missing?
Regards