13

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.

RBT
  • 251
  • 1
  • 3
  • 12
Graviton
  • 2,865
  • 12
  • 42
  • 64
  • @Ngu Soon Hui: Please edit your question so that it contains the error message in text form - this makes it easier to find the solution with search engines, and may therefore help other people with the same problem. Thanks. :) – Tomalak May 02 '09 at 12:01

4 Answers4

27

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.

Adam Gibbins
  • 7,317
  • 2
  • 29
  • 42
  • Excellent, I needed this to alter my instance of sql server but couldn't get it to work! I was trying it with "SQL Server (SQLEXPRESS)" but needed MSSQL$SQLEXPRESS! – John Warlow Feb 24 '11 at 10:33
2

sc delete "SERVICE NAME". Don't forget to put double quotes around the service name (if it has spaces in it). If left out it won't delete the service.

chicks
  • 3,793
  • 10
  • 27
  • 36
sakthi
  • 31
  • 1
0

I had faced the same issue even the service name was correct. Finally I did the following

  1. R-Clicked on your service name (Search 'Services' from system search bar) and found the 'Path to executable'.

  2. Deleted the entry from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services<YourServiceName>\

  3. Deleted the original executable from 'Path to executable'

  4. Restarted the computer.

Shihab
  • 1
-3

Here is the steps how to install, uninstall and delete the services from services.msc.

  1. installutil ServiceName
  2. installutil /u ServiceName
  3. sc delete "ServiceName"

Note open the visual studio command prompt as an administrator and then run the above commands.

  • My question is about when the last step (delete "ServiceName") fails. You are not addressing my question – Graviton Aug 10 '16 at 05:39