Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
711 views
in Technique[技术] by (71.8m points)

windows - Error 1920 service failed to start. Verify that you have sufficient privileges to start system services

We have created a custom windows service. The deployment package is done in InstallShield and the installation prompts for the user name and password for the service Log On account.

We have had no issues at all installing on various Windows 7 (Professional) and Windows 8 machines, but we get the 1920 error when trying to deploy to a Windows 7 Ultimate machine. We have not yet confirmed whether the issue is to do with the OS or the specific machine that we are trying to install this on.

The installer is always run by right-clicking and "Run as Administrator", and the users (both, the user running the installer and the Logon User for which the credentials are supplied) are administrators on the machine. Usually the logged in user installing the service, and the Logon user running the service are the same.

Here are the things we have tried.

  1. Verified the Logon user is a member of Administrators.
  2. Verified the user account settings are exactly the same as another machine where it works.
  3. Verified from Control Panel - Administrative tools - Local Security Policy - Local Policies - Security Options = that these again match machine where it works.
  4. Ensured that all windows updates have been applied.
  5. Verified that the Windows Management Instrumentation Service is running. Restarted it.
  6. Rebooted the machine, then tried again.
  7. Added "generatePublisherEvidence" element in the service configuration file. (Service failed to start error 1920)

But none of the above work.

Hope that someone else has come across a similar issue and has a fix..

UPDATE:

I have also tried the following:

  • Open SecPol.msc
  • Navigate to Local Policies/User Rights Assigment
  • Find "Log on as a service" policy and add the service account
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

1920 is a generic error code that means the service didn't start. My hunch is this:

http://blog.iswix.com/2008/09/different-year-same-problem.html

To confirm, with the installer on the abort, retry, ignore, cancel dialog up... go into services.msc and set the username and password manually. If you get a message saying the user was granted logon as service right, try hitting retry on the MSI dialog and see if it starts.

It could also be missing dependencies or exceptions being thrown in your code.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...