12

I have a service called "A B C". Now I am trying to delete the service from cmd in administrator mode:

sc delete "A B C"

but that gives:

C:\>sc delete "A B C"
[SC] OpenService FAILED 1060:

The specified service does not exist as an installed service.

The service is present in the service manager and is set to automatic. How do I delete it?

http://antivirus.about.com/od/securitytips/ht/how-to-delete-windows-service.htm

1
  • 5
    Make sure you are using the Service Name (look in the properties of the service) - not the Display Name.
    – vcsjones
    Commented Dec 8, 2011 at 15:39

4 Answers 4

13

Since you mentioned that "is set to automatic", it could not be deleted already.

  1. Make sure you have the correct service name. A service can have a service name, and a display name which is different from the former.
  2. If this is a service created by a virus, it is quite possible that OpenService is hooked to keep virus alive, and ordinary method does not work in this situation. Try some anti-virus toolkits, like PsService in Sysinternals Suite or XueTr.
10

In my case I first tried...

sc delete "MyService Name"

and received error 1072. I had the services window list up looking at all my services. I then tried to close the windows service list and tried to run...

sc delete "MyService Name"

and received error 1062. I opened back up the windows service list and found that the service was gone. It could have been pending removal in the first place but the fact of the matter is I simply had to close the windows service list window.

On a side note, a service name and friendly service name can differ. Make sure you know the real service name! To get the actual service name open windows services list and find the service your interested in, we will call it "My Ugly Service". Then open a command prompt and type the following...

sc GetKeyName "My Ugly Service"

It will return the actual name similar to "MyUglySrv". Then just simply type the following (AFTER YOU CLOSE ALL WINDOWS THAT HAVE THE SERVICE INVOLVED, such as windows services list)...

sc delete "MyUglySrv"
1
  • 2
    sc GetKeyName "My Ugly Service" in my case helped me , thanks man
    – Robert
    Commented Sep 21, 2015 at 18:53
4

To see both the Display and Service name for both running and stopped services, enter on a command line:
C:\>sc query type= service state= all

Change all to active or inactive to see that particular type of service.

0

Some folder deleted manually and it create problem sometime,

Re install service again closed all open folder ,service and task manager un install services

*if service not delete then just run following with administrator privilege * run command SC delete postgresql-x64-9.6 (service name )

Not the answer you're looking for? Browse other questions tagged or ask your own question.