u123
u123

Reputation: 16331

Cannot delete windows 7 service

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

Upvotes: 12

Views: 45021

Answers (4)

Gaurav Deshmukh
Gaurav Deshmukh

Reputation: 31

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 )

Upvotes: 0

Arvo Bowen
Arvo Bowen

Reputation: 4947

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"

Upvotes: 10

Dan Aquinas
Dan Aquinas

Reputation: 371

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.

Upvotes: 4

0902horn
0902horn

Reputation: 188

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.

Upvotes: 13

Related Questions