The specified service has been marked for deletion
You may face the problem to delete Windows service using sc command.
When you try to remove a Windows Service with sc delete <service name>, you may encounter the following error:
[SC] DeleteService FAILED 1072:
The specified service has been marked for deletion.
There are several reasons for this error as follow:
 Microsoft Management Console (MMC) is opened. To ensure all instances are closed, run the following command to kill it:
taskkill /F /IM mmc.exe
 Services console is opened. This is the same as the previous point, since Services console is hosted by MMC.
 Event Viewer is opened. MMC is being used when you open Event Viewer.
 Process Explorer is opened. If it is causing the issue, closing it should lead to automatic removal of the service.
 Task Manager is opened.
Close any of the above running process and try again to delete service. If you still face the problem, there may be other issues as well which require further investigation.
Last Updated on