如何配置 Windows Server 2012 R2 以允许交互式服务



我安装了一个新的交互式服务。

我尝试在服务管理器中设置属性"允许服务与桌面交互"。

之后,我在事件查看器中发现了来自服务控制管理器的错误消息:"该服务被标记为交互式服务。 但是,系统配置为不允许交互式服务。 此服务可能无法正常运行。

我修复此错误的所有尝试都失败了:

  • 服务器允许交互式服务 -HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\NoInteractiveServices 的值为 0

  • Windows 服务交互式服务检测正在运行。("Net Start UI0detect")

  • 系统将重新启动。

错误消息仍然存在。 需要执行哪些操作来更正服务器配置以允许交互式服务?

系统: Windows Server 2012 R2 版本 6.3 (Build 9600)

产品线视窗服务器 2008/12

环境视窗服务

原因默认情况下,Windows Server 不再允许交互式服务。

警告:本文包含有关编辑注册表的信息。对注册表的不当更改可能会永久损坏操作系统。在进行任何更改之前,请始终备份注册表。分辨率为了使此服务运行,您必须按照以下步骤调整注册表项。

1. Open registry editor by going to start and typing in regedit.exe.
2. On the registry tree, navigate to HKEY_Local_MachineSystemCurrentControlSetControlWindows.
3. Find the DWORD "NoInteractiveServices".
4. Change the value from a 1 to 0. 
5. Restart the Server.

我在使用 Embarcadero C++ Builder 编译的服务时遇到了同样的问题。Windows还抱怨在我重新启动服务器之前不允许交互式服务。Windows Server 2008 和 Windows Server 2012 都是这种情况。在2008年的实例上,NoInteractiveServices已经关闭。但是在服务器 2012 上,NoInteractiveServices 已打开,并允许我的服务在操作系统完成重新启动时运行。

这应该可以解决您的问题。

  1. 打开regedit并转到键HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlWindows并将NoInteractiveServices设置为 0。

  2. 重新启动服务器。

  3. 打开提升的cmd并键入:

    sc config ui0detect start= auto
    sc start ui0detect
    

现在看看你的问题是否解决了;)。

相关内容

最新更新