Showing posts with label The specified service has been marked for deletion.. Show all posts
Showing posts with label The specified service has been marked for deletion.. Show all posts

Friday, May 12, 2023

[SC] DeleteService FAILED 1072: The specified service has been marked for deletion.

 The error message you encountered ("DeleteService FAILED 1072: The specified service has been marked for deletion") indicates that the Windows service you are trying to delete has already been marked for deletion. This usually occurs when the service is in the process of being uninstalled or has encountered an issue during the uninstallation process.


To resolve this issue, you can try the following steps:


#1 . Restart the computer: A system restart can help clear any pending operations and release the service from the "marked for deletion" state. After restarting the computer, try deleting the service again using the sc command or InstallUtil tool.


#2. Check running processes: Ensure that there are no instances of the service still running in the background. Open Task Manager and check the "Processes" or "Details" tab for any processes related to the service. If you find any, terminate them and then attempt to delete the service again.


#3. Use PowerShell: If the sc command did not work, you can try using PowerShell to forcefully remove the service. Open PowerShell as an administrator and run the following command:



Remove-Service -Name ServiceName -Force

Replace "ServiceName" with the actual name of the service you want to delete. This command will attempt to remove the service forcefully.


If none of these steps work, it is possible that there might be an issue with the service installation or the system itself. In such cases, you may need to seek further assistance or consult with a Windows system administrator for guidance.

ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...