Windows Service is giving Description: <Failed to read description error code 2>

Elv*_*vin 9 c# windows-services

I have tired to uninstall a disabled windows service through registry It is removed from registry but it is still showing in Services.msc with

Description: Failed to read description error code 2

ekt*_*kta 14

直觉/你是如何到达那里的 -

我假设您在这个错误消息中执行了其中一个或两个.a.通过HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services从注册表中手动删除密钥并从此处删除服务)

b.这项服务处于"自动"启动状态 - 所以删除服务在某种程度上误导"自动启动" - 因此生成此代码无法读取描述错误代码2.原因如下 - 您应该停止服务,或者在执行此操作之前将其更改为"手动启动".

如何解决它以及对我有用的东西 -

[1]以管理员模式转到cmd提示符(表示选择cmd - >"以管理员身份运行")

你应该在"C:/ windows/system32 /" [如果你处于管理模式,这应该是默认的,如上所述]类型 - > sfc/scannow 此后扫描将开始,并显示以下日志 -

开始系统扫描.这个过程需要一些时间.

开始系统扫描的验证阶段.验证100%完成.Windows资源保护发现损坏的文件,但无法修复其中的一些.详细信息包含在CBS.Log windir\Logs\CBS\CBS.log中.例如C:\ Windows\Logs\CBS\CBS.log

系统文件修复更改将在下次重新引导后生效.

[2]最后重新启动你的系统!该服务将不再出现在services.msc中.


小智 6

  1. 使用“以管理员身份运行”打开cmd
  2. 在cmd下运行: sc delete "service name which you want to delete"


Cor*_*ech 5

按照这些说明删除该服务。确保您使用服务的名称,而不是其显示名称!

之后该服务不应出现在 Services.msc 中,但您可能在事件查看器中仍有无法正确显示其描述的旧项目。