[wix-users] Running an EXE through Windows Service using WiX

Mayooran Macilamany mayooran99 at gmail.com
Fri Jul 22 21:30:18 PDT 2016


I have this mosquitto.exe which I need to install as a Windows Service
using WiX. When I create a Windows Service project and run the EXE through
its start method everything works fine. But is it possible to run the
mosquitto.exe using only the ServiceControl and ServiceInstall lines and
without having a separate Windows Service project? I tried this but the
Service fails to start though it installs correctly.

 </Component>
  <Component Id="cmp59455E1C37B7879C4BC250DE3D60A2AD"
Directory="MyProgramDir" Guid="179B4F4C-912B-4CA1-8F08-5E1B4ADFFD8B"
Win64="no">
    <File Id="fil7D28AEF774656849395A2FA20A5C963D" KeyPath="yes"
Source="../../../Setups/mosquitto/mosquitto/mosquitto.exe" />
   <ServiceInstall Id="MosquittoSI" Type="ownProcess" Name="Mosquitto"
DisplayName="Mosquitto" Description="Mosquitto broker service"
Start="auto" Account="LocalSystem"  ErrorControl="normal"/>
 <ServiceControl Id="MosquittoSC" Start="install" Stop="both"
Remove="uninstall" Name="Mosquitto" Wait="no" />  </Component>


 Have I done something wrong here or do I really need to launch this
mosquitto.exe through an another exe created using a Windows Service
project? Any help would be much appreciated.


More information about the wix-users mailing list