开发者

"Service failed to start - Verify that you have sufficient privileges to start system services"

开发者 https://www.devze.com 2023-02-27 03:56 出处:网络
When I tried to run the installer that I created in WIX, the error message below occured: \"Service \'Report Generator Service\' (Report Generator Service) failed to start. Verify that you have suffi

When I tried to run the installer that I created in WIX, the error message below occured:

"Service 'Report Generator Service' (Report Generator Service) failed to start. Verify that you have sufficient privileges to start system services".

I already read some blogs here about this by my codes are almost identical but still this error keeps popping out. The weird thing about this is that when I first created this installer with almost the same code as below, this error is not happening during installation. Please help me guys I'm lost... :(

<File Id="ReportGenerator.exe"
                                Name="ReportGenerator.exe"
                                Source="..\ReportGenerator\bin\Release\ReportGenerator.exe"
                                KeyPath="yes" />
                          <ServiceInstall Id="ReportGeneratorServiceInstaller"
                                              Nam开发者_如何学JAVAe="ReportGeneratorInstaller"
                                              DisplayName="Report Generator Service"
                                              Type="ownProcess"
                                              Start="auto"
                                              ErrorControl="normal"
                                              Description="Generate Reports"
                                              Account="[SERVICEACCOUNT]"
                                              Password="[SERVICEPASSWORD]" />
                          <ServiceControl Id="StartReportService"
                                          Start="install"
                                          Stop="both"
                                          Remove="uninstall"
                                          Name="ReportGeneratorInstaller"
                                          Wait="yes" />


If your service relies on assemblies being installed into the GAC, you won't be able to start it using ServiceControl. GAC'd assemblies aren't present until the install is committed, which is too late for ServiceControl to work.


This error can also happen if the Service Account doesn't have "Log on as a service" permission. To fix this

  • Open SecPol.msc
  • Navigate to Local Policies/User Rights Assigment
  • Find "Log on as a service" policy and add the service account

I'm mentioning this here because a Google search for the above error lists this link in the first page. :) someone might find this useful

0

精彩评论

暂无评论...
验证码 换一张
取 消