23

I have a windows service running on a server (that I would rather not reboot if I can).

The EXE for this service is gone (beyond recovery) and I don't have a copy (it was a debugging version that has since been updated).

Is there anyway to remove this service from the services list without the exe that ran it?

Vaccano
  • 78,325
  • 149
  • 468
  • 850
  • 1
    possible duplicate of [How do I uninstall a Windows service if the files does not exist anymore?](http://stackoverflow.com/questions/197876/how-do-i-uninstall-a-windows-service-if-the-files-does-not-exist-anymore) – Matt Davis Dec 16 '10 at 22:40

6 Answers6

32

Have you tried sc <server> delete [service name] from the command line?

A more comprehensive answer can be found here.

Community
  • 1
  • 1
Matt Davis
  • 45,297
  • 16
  • 93
  • 124
16

Try:

sc delete servicename
barti_ddu
  • 10,179
  • 1
  • 45
  • 53
14

Note that sc delete servicename works, but the servicename is the 'KeyName'.

E.g. For Confluence, you will see "Atlassian Confluence" in the list of services. This is the 'Descriptive' name. To remove it type:

sc GetKeyName "Atlassian Confluence"

In my case this returned Confluence150114140910. So I then typed:

sc delete Confluence150114140910
Sam Kenny
  • 395
  • 4
  • 9
3

Use autoruns tool (formerly by sysinternals, now on Microsoft site), it lets you manage services and drivers (their records in registry).

Tan
  • 221
  • 1
  • 7
Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121
2

You can also use the register

  1. Start > Run > regedit
  2. Goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  3. Delete the folder of your service.
  4. Restart your system.
Zong
  • 6,160
  • 5
  • 32
  • 46
msjonathan
  • 514
  • 2
  • 11
  • 26
0

this works great (need admin cmd )

C:\Windows\system32>sc GetKeyName "SERVER"
[SC] GetServiceKeyName Êxito
Nome = SERVER

C:\Windows\system32>sc delete "SERVER"
[SC] DeleteService Êxito

C:\Windows\system32>sc delete "SERVER 2"
[SC] DeleteService Êxito
Reins
  • 1,109
  • 1
  • 17
  • 35