(SC) DeleteService FAILED 1072

我只是一个虾纸丫 提交于 2019-11-27 00:01:28

问题


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.

回答1:


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.




回答2:


I had a similar problem and what I did to overcome it was the following:

  1. Stop the service: net stop "ServiceName"
  2. Ensure: the "mmc.exe" process does not exist (The "Services" list window): taskkill /F /IM mmc.exe
  3. Delete the service: sc delete "ServiceName"

    C:\server>sc delete "ServiceName"
    
    [SC] DeleteService SUCCESS
    

Now, if I execute another sc command, what I get is the following:

C:\server>sc delete "ServiceName"

[SC] OpenService FAILED 1060:

The specified service does not exist as an installed service.

But not the 1072 error message




回答3:


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.




回答4:


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




回答5:


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.




回答6:


In Windows 7, make sure Event Viewer closed before deleting.




回答7:


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.




回答8:


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




回答9:


Logging-out and logging-in again close all blocking apps thus resolves the problem.




回答10:


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.



来源:https://stackoverflow.com/questions/305037/sc-deleteservice-failed-1072

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!