本文翻译自:How to solve “The specified service has been marked for deletion” error

I try to remove a Windows Service with sc delete <service name> , and encounter the following error: 我尝试使用sc delete <service name> Windows服务,并遇到以下错误:

[SC] DeleteService FAILED 1072: [SC] DeleteService失败1072:

The specified service has been marked for deletion. 指定的服务已标记为删除。

What I've already done: 我已经完成的工作:

  • Stopped the service, obviously. 显然,已停止服务。 The sc queryex "<service name>" gives the following result: sc queryex "<service name>"给出以下结果:

     SERVICE_NAME: Stub service TYPE : 10 WIN32_OWN_PROCESS STATE : 1 STOPPED WIN32_EXIT_CODE : 1067 (0x42b) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 PID : 0 FLAGS : 
  • Ensured that Microsoft Management Console is closed ( taskkill /F /IM mmc.exe ), 确保关闭了Microsoft管理控制台 ( taskkill /F /IM mmc.exe ),

  • Ensured that Event Viewer is closed , 确保关闭了事件查看器 ,

  • Removed the key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\<service name> from the registry . 从注册表中删除了键HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services \\ <服务名称> 。

    Due to this removal, services.msc still shows the service (with a name, but no status or startup type), but the description is “<Failed to Read Description. 由于此删除, services.msc仍显示该服务(带有名称,但没有状态或启动类型),但是描述为“ <无法读取描述。 Error Code: 2 >”. 错误代码:2>”。 When attempting to view the properties, “The system cannot find the file specified.” is shown five times. 尝试查看属性时,显示五次“系统找不到指定的文件。”。

The problem persists. 问题仍然存在。

What is the next step? 你下一步怎么做?


#1楼

参考:https://stackoom.com/question/1OH70/如何解决-指定的服务已被标记为删除-错误


#2楼

There may be several causes which lead to the service being stuck in “marked for deletion”. 可能有多种原因导致服务卡在“标记为删除”中。

  1. SysInternals' Process Explorer is opened . SysInternals的Process Explorer打开 。 Closing it should lead to automatic removal of the service. 关闭它会导致服务自动删除。

  2. Task Manager is opened . 任务管理器已打开 。

  3. Microsoft Management Console (MMC) is opened . Microsoft管理控制台(MMC)已打开 。 To ensure all instances are closed, run taskkill /F /IM mmc.exe . 要确保关闭所有实例,请运行taskkill /F /IM mmc.exe

  4. Services console is opened . 服务控制台已打开 。 This is the same as the previous point, since Services console is hosted by MMC. 这与上一点相同,因为Services控制台由MMC托管。

  5. Event Viewer is opened . 事件查看器已打开 。 Again, this is the same as the third point. 同样,这与第三点相同。

  6. The key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\{service name} exists . 密钥HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services \\ {服务名称}存在 。

  7. Someone else is logged into the server and has one of the previously mentioned applications opened. 其他人登录到服务器 ,并打开了前面提到的应用程序之一。

  8. An instance of Visual Studio used to debug the service is open. 用于调试服务的Visual Studio实例已打开。


#3楼

This can also be caused by leaving the Services console open. 这也可能是由于打开服务控制台导致的。 Windows won't actually delete the service until it is closed. 在关闭服务之前,Windows实际上不会删除该服务。


#4楼

In my case, it was caused by unhandled exception while creating eventLog source. 就我而言,这是由创建eventLog源时未处理的异常引起的。 Use try catch to pin point the cause. 使用try catch查明原因。


#5楼

发现了另一项要检查的内容-在任务管理器中查找-如果其他用户已连接到此框,即使他们已“断开连接”,您也必须实际注销他们才能最终删除该服务。


#6楼

Deleting registry keys as suggested above got my service stuck in the stopping state. 如上所述删除注册表项会使我的服务陷入停止状态。 The following procedure worked for me: 以下过程对我有用:

open task manager > select services tab > select the service > right click and select "go to process" > right click on the process and select End process 打开任务管理器>选择服务选项卡>选择服务>右键单击并选择“转到流程”>右键单击该流程,然后选择“结束流程”

Service should be gone after that 在那之后服务应该消失了

如何解决“指定的服务已被标记为删除”错误相关推荐

  1. 指定的服务器标记为删除,如何解决“指定的服务已被标记为删除”错误

    可能有几个原因导致服务卡在"标记为删除"中. SysInternals的Process Explorer打开 . closures它应该导致服务的自动删除. 任务pipe理器已打开 ...

  2. mysql指定服务标记为删除_如何解决“指定的服务已标记为删除”

    如何解决"指定的服务已标记为删除" 我尝试使用services.msc删除Windows服务,并遇到以下错误: [SC] DeleteService FAILED 1072: 指定 ...

  3. Windows 服务卸载之后 重新安装提示 “指定的服务已标记为删除”

    背景:        将一个项目做成一个windows服务,在调试的时候,需要卸载.安装该服务,但提示下面的错误:"指定的服务已标记为删除",进入服务管理界面,启动自己注册的服务, ...

  4. mysql 指定的服务已标记为删除,异常

    今天小G,在开发中,需要使用5版本的mysql,就在本地安装一个, 安装步骤 第一: 新增一个my.ini的文本在D:\tool\mysql\mysql-5.7.20-winx64 目录中 #skip ...

  5. 安装包安装服务,点修复出现的错误”Error 1001:指定的服务已存在“ 解决办法...

    安装项目下,右键视图->自定义操作,出现安装.提交.回滚.卸载四个文件夹,右键安装,添加自定义操作,选择安装的服务为输出文件 右键安装输出文件->在condition->Not (I ...

  6. 出现依存服务不存在,或已被标记为删除的解决办法(亲试可行)

    手工修复损坏的WMI: 1.点击开始,点击运行,输入services.msc后回车 2.右键点击 Windows Management Instrumentation 服务,点击属性 3.在Gener ...

  7. 在尝试重新安装一个服务时遇到这样的错误:指定服务已标记为删除

    指定服务已标记为删除 在尝试重新安装一个服务时遇到这样的错误: An exception occurred during the Install phase. System.ComponentMode ...

  8. 服务器1075错误服务修复,错误1075:依存服务不存在,或已标记为删除

    错误1075:依存服务不存在,或已标记为删除0 hyz47512013.11.09浏览162次分享举报 大家好,我是玩韩服跑跑的玩家,但是我在网吧玩的时候老是错误1075:依存服务不存在,或已标记为删 ...

  9. winmgmt服务不存在或已标记为删除·windows management instrumentation这个服务无法启动...

    服务不存在,或已被标记为删除.(异常来自 HRESULT:0X80070433) 这个错误一般是在刚安装软件的的电脑上出现,今天偶遇,且看我如何化解. 问题分析:这个问题主要原因是由于服务列表中的wi ...

最新文章

  1. OpenCV中的霍夫线变换、概率霍夫线变换
  2. 度量学习:ArcFace算法和工程应用总结
  3. spring boot: 构建项目时报错Not a managed type
  4. tomcat实现session集群及tomcat+memcached共享session存储(四)
  5. 推荐一款万能抓包神器:Fiddler Everywhere
  6. Pinterest:Android系统上的视频管理
  7. 数据中台 VS 传统大数据平台,这 8 点区别要了解
  8. Netty的并发编程实践2:volatile的正确使用
  9. 根据模型顶点坐标计算法线
  10. 金蝶K3老单新增自定义菜单按钮
  11. alexnet论文_【SOT】Siamese RPN++ 论文和代码解析
  12. 江西赣州计算机应用中心,赣州计算机应用与维修专业学校
  13. 使用markdown写出Leaky ReLU的计算公式
  14. html css x y相对定位坐标,HTML与CSS之相对定位、绝对定位
  15. 互联网信息服务(仅限互联网信息服务)
  16. PTA作业15:数列求和
  17. 【python】k点游戏 ★★★★★
  18. oracle 视图 自增列,Oracle实现自增列
  19. QtAV编译以及使用
  20. 如何设置电脑壁纸轮播

热门文章

  1. CouchBase C 客户端接口调用实例
  2. Python 网页爬虫 文本处理 科学计算 机器学习 数据挖掘兵器谱 - 数客
  3. Quick 3.3 的代码资源加密
  4. java解析json的一种方法
  5. 网站操作系统HttpOS2.2安装图解教程
  6. ISA Server 2004服务器发布DHCP服务器
  7. LINUX下的FTP服务器
  8. [转载]C++ 中有符号类型到无符号类型的转换(C和C++程序员面试秘笈P9面试题6)...
  9. hi模板文件报乱码问题
  10. 把Arraylist转换成GameObject[]