The specified service has been marked for deletion error

You may face the problem to delete Windows service using sc command.

WHMCS Complete Billing and Support

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:

[1] Microsoft Management Console (MMC) is opened. To ensure all instances are closed, run the following command to kill it:

taskkill /F /IM mmc.exe

[2] Services console is opened. This is the same as the previous point, since Services console is hosted by MMC.

[3] Event Viewer is opened. MMC is being used when you open Event Viewer.

[4] Process Explorer is opened. If it is causing the issue, closing it should lead to automatic removal of the service.

[5] 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.

Posted in Windows.

Leave a Reply

Your email address will not be published. Required fields are marked *