(SC) 删除服务失败 1072
上次我创建 WAS 配置文件和 WASService,然后我尝试配置并运行许多脚本来学习如何配置 WAS,最后它崩溃了,所以我使用 wasprofile 删除此配置文件并忘记删除 WASService。
现在我发现 IBM Webphere Application Server 服务显示在 services.msc 列表中,因此我尝试使用 WASService.exe
-remove 命令和 windows SC
命令删除它,但收到消息
C:\Program Files\IBM\WebSphere\AppServer\bin>sc delete "IBMWAS61Service - DEV"
[SC] DeleteService FAILED 1072:
The specified service has been marked for deletion.
Last time I create WAS profile and WASService then I try to config and run many script for learn how to config WAS, Finally it crash so i use wasprofile delete this profile and forgot delete WASService.
Now I found IBM Webphere Application Server service display in services.msc list, so I tried to delete it with WASService.exe
-remove command and windows SC
command but I got message
C:\Program Files\IBM\WebSphere\AppServer\bin>sc delete "IBMWAS61Service - DEV"
[SC] DeleteService FAILED 1072:
The specified service has been marked for deletion.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
确保该服务已停止,服务控制面板已关闭,并且该服务没有打开任何打开的文件句柄。
还要确保 ProcessExplorer 没有运行。
make sure the service is stopped, the services control panel is closed, and no open file handles are open by the service.
Also make sure ProcessExplorer is not running.
我遇到了类似的问题,我所做的解决方法如下:
删除服务:sc delete "ServiceName"
现在,如果我执行另一个 sc 命令,我得到的是以下内容:
但不是 1072 错误消息
I had a similar problem and what I did to overcome it was the following:
Delete the service: sc delete "ServiceName"
Now, if I execute another sc command, what I get is the following:
But not the 1072 error message
我所做的就是转到
regedit
中的以下位置:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
从这里,您将看到计算机上每个服务的文件夹。 只需删除您想要的服务的文件夹即可。
注意:在尝试此操作之前停止服务。
What I've done is go to this location in
regedit
:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
From here, you will see a folder for every service on your machine. Simply delete the folder for the service you wish, and you're done.
N.B: Stop the service before you try this.
由于某些错误原因,当您告诉事件查看器和/或 Services.msc 时,它们都不会执行正确的
刷新
!关闭它们并重新启动,无论如何该服务都会被删除。
For some buggy reason both Event Viewer and/or Services.msc won't do a proper
refresh
when you tell them to!Close them and restart, and the service would have been deleted anyway.
我遇到过同样的问题。 在我关闭并重新打开“计算机管理”窗口后,该服务已从列表中删除。 我运行的是 Windows 7
I had the same issue. After I closing and re-opening the Computer Management window the service was removed from the list. I'm running windows 7
在 Windows 7 中,请确保在删除之前关闭事件查看器。
In Windows 7, make sure Event Viewer closed before deleting.
我也遇到了这个错误,请确保服务指向的 exe 已停止。 还要确保其他窗口后面没有任何 Windows 对话框。 这就是为什么我的没有删除。 它后面有一条 Windows 消息,说该服务已被删除或类似的内容。只需单击“确定”,就可以了。
I had this error also, make sure the exe the service is pointing to is stopped. Also make sure you don't have any Windows dialog boxes behind your other windows. That is why mine wasn't deleting. There was a windows message behind it saying this service has been deleted or something similar.. just had to click ok, there it went.
由于服务名称中的拼写错误,我遇到了同样的错误,我试图删除服务显示名称而不是服务名称。
一旦我使用了正确的服务名称,它就工作得很好
I had the same error due to a typo in the service name, i was trying to delete the service display name instead of the service name.
Once I used the right service name it worked fine
注销并再次登录会关闭所有阻塞的应用程序,从而解决问题。
Logging-out and logging-in again close all blocking apps thus resolves the problem.
第 3 方应用程序卸载程序已删除该服务的文件,然后使该服务处于待删除状态。
在尝试关闭所有应用程序、识别服务的 PID(无法)进行终止、注销所有其他用户并注销并重新登录后,重新启动是对我有用的唯一修复方法。
The 3rd party application uninstaller had removed the files for the service and then left the service in this pending deletion state.
After trying to close all applications, identifing PID of service(couldn't) for kill, logging off all other users and logging off and on, rebooting was the only fix that worked for me.
也可能发生这种情况的一种情况是,如果有其他服务或应用程序保持打开通过 OpenService 获取的服务句柄。 例如,基于某些外部事件启动和停止服务的监视服务可以为其监视的每个服务保持打开的句柄。 在这种情况下,卸载服务将使其处于“标记为删除”状态,直到通过 OpenService 获取的所有句柄都被关闭。
One situation where this can also happen is if there is some other service or application that is holding open a service handle obtained with OpenService. For example, a monitoring service that starts and stops services based on some external event can keep open handles to each of the services it monitors. In this case, uninstalling the service would leave it in the "marked for deletion" state until all handles obtained with OpenService are closed.