0

Although the first installation works fine, when I try to update the application to a newer version, the installer presents the following message:

Service X could not be installed. Verify that you 
have sufficient privileges to install system services.

When cancelling the update installation, the software is removed and if I install again, the process finishes successfully.

I'ts important to say that both install and update are requiring elevation of privilege.

Any ideas?

Elevation of Privilege

<Package InstallerVersion="300" 
         Compressed="yes" 
         InstallScope="perMachine" 
         InstallPrivileges="elevated" 
         AdminImage="yes" /> 

Service configuration:

<ServiceInstall Id="ServiceInstaller"
                Type="ownProcess"
                Name="X"
                DisplayName="X"
                Description="X"
                Start="auto"
                ErrorControl="normal" />

<ServiceControl Id="StartService" 
                Start="install" 
                Stop="both" 
                Remove="uninstall" 
                Name="X" Wait="yes" />

1 Answers1

0

I can be many thing. I suggest to try couple of things.

-set account

  <ServiceInstall  Account="NT AUTHORITY\LocalService" />

-Install the MSI package. When the error dialog comes up do not dismiss the dialog. Start services.msc or use sc.exe from the command-line to attempt to start your service. If necessary debug into your service executable directly to see why it cannot be started. Summery from Failed to install and start Windows services in WiX installer

-Ensure that it does not depend on files being placed in the GAC.

-Use event viewer to check the error.

-What is the name of the service? there is limitation on naming the service.

-if the service is already exist it can give you that insufficient privileges error, check that the service is uninstalled before installing again. Should be part of the upgrade procedure.

Hope it will get you started.

Community
  • 1
  • 1
Arkady Sitnitsky
  • 1,846
  • 11
  • 22