I'm trying to install a windows service using windows setup. Halfway through the setup hangs and never completes.
After a few minutes (4-5 mins) it throws the following error.
verify that you have enough privileges to start system services
The install.log is stuck at here.
Service1.cs class
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
ServiceName = "MSPmateAgentService";
}
protected override void OnStart(string[] args)
{
}
protected override void OnStop()
{
}
}
product.wxs file
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MSPmate Agent" Language="1033" Version="1.0.0.1" Manufacturer="MSPmate" UpgradeCode="2a2faae2-115e-4b45-aeeb-422663a2e357">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of MSPmate agent is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="WixSetUpProject" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<InstallExecuteSequence>
<Custom Action="CustomActionFormId" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<Binary Id="CustomActionBinary" SourceFile="$(var.WixCustomForms.TargetDir)$(var.WixCustomForms.TargetName).CA.dll" />
<CustomAction Id="CustomActionFormId" Execute="immediate" Impersonate="no" BinaryKey="CustomActionBinary" DllEntry="PerformAuthentication" Return="check" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MSPMATEAGENT" Name="MSPMATE AGENT" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="MSPMATEAGENT">
<Component Id="ProductComponent">
<!-- <File Source="$(var.RMMSetUp.TargetPath)" /> -->
<File Id='MSPmateAgentService' Name='MSPmateAgentService' DiskId='1' Source='$(var.RMMSetUp.TargetPath)' KeyPath='yes' Vital="yes"/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Name="MSPmateAgentService"
DisplayName="MSPmate Agent Service"
Description="Agent service"
Start="auto"
Account="LocalSystem"
Vital="yes"
Interactive="no"
ErrorControl="normal" />
<ServiceControl Id="StartService"
Name="MSPmateAgentService"
Start="install"
Wait="no" />
<ServiceControl Id="StopService"
Name="MSPmateAgentService"
Stop="uninstall"
Remove="uninstall"
Wait="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
am I missign anything here?