Cannot delete an existing service using sc command: The specified service does not exist as an installed service

windows-service

I want to delete MyNewService, but when I type in

sc delete MyNewService

I simply can't delete it because there is no such servic, due to

"the Specified service does not exist as an installed service"

error

Any ideas how to solve this problem?

Edit: as far as the service panel is concerned, the MyNewService is there all the time. I restarted the PC a few times and it's there.

Best Answer

View the properties of the service and you'll see a "Service Name" and "Display Name". The display name is the one you see in services.msc, you need to use the service name with the net command however. Sometimes they're very different for example "Extensible Authentication Protocol Service" is the display name and "EapHost" is the service name.