I have one requirement to create a service using WiX. I tried with two approaches
- Using Wix ServiceInstall
with the ServiceInstall I am able to create the service but could not able to start it. I tried with all possible ways and multiple Accounts but issue didn’t resolved
- Using custom action
Created one custom action whose work is to call Sc.Exe process to create and start the service.
I called this custom action in WiX installer. Custom action is getting called, sc.exe command is also getting executed, but service is not getting created.
This forum is dedicated to Wix Code. For questions that are not related to code you can contact the Wix support team . You’ll get better help for your problem there.
Write a comment…
It is related to code only.
<File Id=‘GarudaApiExe’ Name=‘GarudaApiExe’ DiskId=‘1’ Source=Garuda.Api.exe’ KeyPath=‘yes’/>
<ServiceInstall
Id=“ServiceInstaller”
Type=“ownProcess”
Name=“GarudaApiExe”
DisplayName=“GarudaApiExe”
Description=“Run Garuda API As Service”
Start=“auto”
ErrorControl=“normal”>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="GarudaApiExe" Wait="no" />
</Component>
<!--Account="[SERVICECREDENTIALS_USERLOGIN]"
Password="[SERVICECREDENTIALS_PASSWORD]"-->
</ComponentGroup>
I am able to create the service if I comment the ServiceControl but still the service could not start. If I will uncomment the Service Control getting privileges issue and could not able to install the service.
Please help and let me know if still I am in wrong forum
Your question is not related to Wix Code. You might want to check here for more information. I would recommend contacting the Wix support team , as they should be better able to help you.
Did you find a solution by any chance? I’m having the same exact issue.