I am getting the following error when running my installer a secondary PC, but it works when i run it on my development machine.
MSI (s) (90:2C) [16:22:35:704]: Executing op: ServiceInstall(Name=PCR2,DisplayName=Amusoft PC Remote 2,ImagePath="C:\Program Files\Amusoft\PC Remote 2\web\Amusoft.PCR.Server.exe",ServiceType=16,StartType=2,ErrorControl=32771,,Dependencies=[~],,StartName=LocalSystem,Password=**********,Description=Backend service required for PC Remote to interact with this computer,,)
InstallServices: Service:
Error 1923. Service 'Amusoft PC Remote 2' (PCR2) could not be installed. Verify that you have sufficient privileges to install system services.
This is my fragment for installing and starting the service
<Fragment>
<Component Id="RegistrySetValues" Guid="CCA1011E-0C44-4111-9089-A4F5D49D3D51" Win64="yes" Directory="WEBFOLDER">
<RegistryKey Root="HKLM" Key="SOFTWARE\Amusoft\PC Remote 2" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue
Type="string"
Name="InstallLocation"
Value="[PRODUCTNAMEFOLDER]"/>
<RegistryValue
Type="string"
Name="Version"
Value="$(var.ProductVersion)"/>
</RegistryKey>
</Component>
<Component Id='BackendServerExe' Guid='7B39D2A5-140F-452D-BAEC-0B965A15CCC9' Directory='WEBFOLDER'>
<File Id='BackendServer' Name='Amusoft.PCR.Server.exe' Vital='yes' Source='$(var.SolutionDir)..\artifacts\msi\web\Amusoft.PCR.Server.exe' KeyPath='yes'/>
<fire:FirewallException
Name='Amusoft PC Remote 2 Server'
Id='BackendServerFirewall'
Port='[CUSTOM_PORT]'
Protocol='tcp'
Profile='all'
Scope='localSubnet'
IgnoreFailure='no'
Description='Amusoft PC Remote 2 Server'/>
<ServiceInstall Name='$(var.ServiceName)'
Type='ownProcess'
Start='auto'
Account="LocalSystem"
DisplayName="Amusoft PC Remote 2"
Id="PCR2.Install"
Description="Backend service required for PC Remote to interact with this computer"
Vital="yes" ErrorControl="critical">
<!-- Vital="yes" ErrorControl="critical"> -->
<util:ServiceConfig
FirstFailureActionType="restart"
SecondFailureActionType="restart"
ThirdFailureActionType="none"
ResetPeriodInDays="1"
ServiceName="$(var.ServiceName)"
RebootMessage="PC Remote 2 requires a reboot"
RestartServiceDelayInSeconds="180"
/>
</ServiceInstall>
<!-- <ServiceControl Id="PCR2.Control.Start" -->
<!-- Name="$(var.ServiceName)" -->
<!-- Start="install" -->
<!-- Wait="no" /> -->
<ServiceControl Id="PCR2.Control.Stop"
Name="$(var.ServiceName)"
Stop="uninstall"
Remove="uninstall"
Wait="yes" />
<!-- <ServiceControl Id="PCR2.Control" -->
<!-- Name="$(var.ServiceName)" -->
<!-- Remove="both" -->
<!-- Start="install" -->
<!-- Stop="both"/> -->
</Component>
</Fragment>
I looked at these questions, but that did not fix my issue
- How to install and start a Windows Service using WiX
- Wix installer: Verify that you have sufficient privileges to start system services
Is this related to strong name signing? I don't understand why it works on my dev machine, but fails on a secondary machine