Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solve “The specified service has been marked for deletion” error via bat

I need to ensure that a particular service is always running on the computer. To do this, I use a bat with the command

sc start "servicename"

However, if the service has been marked for deletion, I get the above error. So, what is the proper way to solve this situation via bat?

like image 928
Eduardo Avatar asked Oct 22 '15 17:10

Eduardo


1 Answers

  • Kill any .exe process associated with the service
  • Adding this before SC command most probably, this will resolve the problem

taskkill /F /IM mmc.exe

If this issue still not fixed, just restart the PC and try again. I had the same problem, and got resolved.

like image 130
Riyaz Hameed Avatar answered Nov 01 '22 20:11

Riyaz Hameed