windows 错误 1920 服务无法启动。验证您是否有足够的权限来启动系统服务

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20061057/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:06:33  来源:igfitidea点击:

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

windowsserviceinstallation

提问by smitra

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.

我们已经创建了一个自定义的 Windows 服务。部署包在 InstallShield 中完成,安装提示输入服务登录帐户的用户名和密码。

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.

我们在各种 Windows 7(专业版)和 Windows 8 机器上安装时完全没有问题,但在尝试部署到 Windows 7 Ultimate 机器时出现 1920 错误。我们尚未确认问题是否与操作系统或我们尝试安装它的特定机器有关。

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)
  1. 验证登录用户是管理员的成员。
  2. 验证用户帐户设置与它工作的另一台机器完全相同。
  3. 从控制面板 - 管理工具 - 本地安全策略 - 本地策略 - 安全选项验证 = 这些再次匹配它工作的机器。
  4. 确保已应用所有 Windows 更新。
  5. 验证 Windows Management Instrumentation 服务正在运行。重新启动它。
  6. 重新启动机器,然后再试一次。
  7. 在服务配置文件中添加了“generatePublisherEvidence”元素。(服务无法启动错误 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
  • 打开 SecPol.msc
  • 导航到本地策略/用户权限分配
  • 找到“作为服务登录”策略并添加服务帐户

回答by Christopher Painter

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

1920 是一个通用错误代码,表示服务未启动。我的预感是这样的:

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

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.

要确认,安装程序中止,重试,忽略,取消对话框...进入 services.msc 并手动设置用户名和密码。如果您收到一条消息说用户被授予作为服务登录的权限,请尝试在 MSI 对话框中点击重试并查看它是否启动。

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

也可能是缺少依赖项或在您的代码中抛出异常。

回答by Markus

Make sure all services windows are closed before starting install/uninstall

确保在开始安装/卸载之前关闭所有服务窗口

回答by Mark

I also had the same issue. I fixed this by installing the .NET framework version 4.5.

我也有同样的问题。我通过安装 .NET 框架 4.5 版解决了这个问题。

回答by nicko

In my case I had to delete the services in my installshield project and start from square one. My original service components were added manually and I couldn't get them working, the only error I was getting was the same "Error 1920 service failed to start. Verify that you have sufficient privileges to start system services."that you were getting. After deleting my components, I re-added them using the component wizard.
enter image description here

就我而言,我不得不删除 installshield 项目中的服务并从第一个开始。我的原始服务组件是手动添加的,我无法让它们工作,我遇到的唯一错误是“错误 1920 服务无法启动。验证您是否有足够的权限来启动系统服务。” 你得到的。删除组件后,我使用组件向导重新添加了它们。
在此处输入图片说明

Component Wizard looks like this

组件向导如下所示

I actually had to create two new components. One was of type "Install Service".

我实际上必须创建两个新组件。一种是“安装服务”类型。

Service Component type shown here

此处显示的服务组件类型

enter image description here

在此处输入图片说明

The other component I had to add was of "Control Service" type.

我必须添加的另一个组件是“控制服务”类型。

enter image description here

在此处输入图片说明

I had to choose the service that I had setup when I added the Install Service component.enter image description here

我必须选择我在添加安装服务组件时设置的服务。在此处输入图片说明

After that it worked, even though nothing looked differently from the components I had added manually. Installshield must do something behind the scenes when it wires up the service components with the component wizard.

在那之后它工作了,即使看起来与我手动添加的组件没有什么不同。当 Installshield 用组件向导连接服务组件时,它必须在幕后做一些事情。

All of this was with Install Shield 2016.

所有这一切都是通过 Install Shield 2016 实现的。

回答by user3513109

In my case, the service failed to start because I didn't set Platform='x64'in the wix file.

就我而言,该服务无法启动,因为我没有Platform='x64'在 wix 文件中进行设置。

I saw these errors in Event Viewer:

我在事件查看器中看到了这些错误:

Service cannot be started.

System.BadImageFormatException: Could not load file or assembly 'SOME_LIBRARY_FILE, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33345856ad364e35' or one of its dependencies.

服务无法启动。

System.BadImageFormatException:无法加载文件或程序集“SOME_LIBRARY_FILE,版本=5.0.0.0,文化=中性,PublicKeyToken=33345856ad364e35”或其依赖项之一。

I tried checking the bitness of all service related files using CorFlags.exe. When I changed my installer to be 64 bit, everything started working fine.

我尝试使用CorFlags.exe. 当我将安装程序更改为 时64 bit,一切都开始正常运行。

回答by Ivan Chau

Check service dependenciesif they are disabled.

如果它们被禁用,请检查服务依赖项

Set those dependencies to Automatic, Start them and it should work.

将这些依赖项设置为自动,启动它们,它应该可以工作。

回答by Vishnu Prasanth

Workaround: This is a problem we have observed too, in Windows Server 2012 R2. I haven't found a reason or solution yet. Here is my work around.

解决方法:这也是我们在 Windows Server 2012 R2 中观察到的问题。我还没有找到原因或解决方案。这是我的工作。

During installation while error is shown, go to Services.msc. Find the service which throws the error, then re-enter the password in the service's log-in information. Then, hit "retry" in setup. It works.

在安装过程中显示错误时,转到 Services.msc。找到抛出错误的服务,然后在服务的登录信息中重新输入密码。然后,在设置中点击“重试”。有用。

The error will not be shown for same user again. But will be shown for a different user.

不会再次为同一用户显示该错误。但将显示给不同的用户。

回答by Thierry Beliere

I had this issue while testing software. Drivers were not signed.

我在测试软件时遇到了这个问题。驱动程序没有签名。

Tip for me was: in cmd line: (administrator) bcdedit /set TESTSIGNING ON and reboot the machine (shutdown -r -t 5)

给我的提示是:在 cmd 行中:(管理员)bcdedit /set TESTSIGNING ON 并重新启动机器(关机 -r -t 5)

回答by John-Michael Burke

I found this answer on another site but it definitely worked for me so I thought I would share it.

我在另一个网站上找到了这个答案,但它确实对我有用,所以我想我会分享它。

In Windows Explorer: Right Click on the folder OfficeSoftwareProtection Platform from C:\Program Files\Common Files\Microsoft Shared and Microsoft from C:\Program data(this is a hidden folder) Properties > Security > Edit > Add > Type Network Service > OK > Check the Full control box > Apply and OK.

在 Windows 资源管理器中:右键单击 C:\Program Files\Common Files\Microsoft Shared 中的文件夹 OfficeSoftwareProtection Platform 和 C:\Program data 中的 Microsoft(这是一个隐藏文件夹)属性 > 安全性 > 编辑 > 添加 > 键入网络服务 >确定 > 选中完全控制框 > 应用并确定。

In Registry Editor (regedit.exe): Go to HKEY_CLASSES_ROOT\AppID registry >Right Click on the folder > Permissions > Add > Type = NETWORK SERVICE > OK > Check Full Control > Apply > OK

在注册表编辑器 (regedit.exe) 中:转到 HKEY_CLASSES_ROOT\AppID 注册表 > 右键单击​​文件夹 > 权限 > 添加 > 类型 = NETWORK SERVICE > 确定 > 检查完全控制 > 应用 > 确定

I found this response here::: https://social.technet.microsoft.com/Forums/windows/en-US/5dda9b0b-636f-4f2f-8e50-ad05e98ab22d/error-1920-service-office-software-protection-platform-osppsvc-failed-to-start-verify-that-you?forum=officesetupdeployprevious

我在这里找到了这个回复::: https://social.technet.microsoft.com/Forums/windows/en-US/5dda9b0b-636f-4f2f-8e50-ad05e98ab22d/error-1920-service-office-software-protection- platform-osppsvc-failed-to-start-verify-that-you?forum=officesetupdeployprevious

Which was originally a method discovered by Jennifer Zhan

最初是詹妮弗·詹(Jennifer Zhan)发现的一种方法

回答by Teezy7

Open Event Viewer go to window logs->Application and look at the errors prior to this error it will give you the actual error you looking to solve

打开事件查看器转到窗口日志->应用程序并查看此错误之前的错误,它将为您提供您希望解决的实际错误