How to delete a Windows service?

Hi,

Here's something quite basic, but was always profound for many of us- till now.

It usually happens that an installed application crashes somehow and becomes unusable to the extent that you are required to manually remove the registry entries, the program files, the databases- but if that program has registered services, it becomes really difficult to get those services removed from the snap-in, so that you have a clean machine again- [In case this is not a Virtual Machine - where you can easily revert snapshots]

Everyone suggests RegSvr32 /u, but it is the command that registers/un-registers .DLL components only and I always found it useless when trying to remove .EXE services [which point to executables].

 To get .exe services removed, find the following key in the registry:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

Locate the service you want to get rid of, and delete its key. Done! You may want to stop the service first, since you won't be able to once it's gone (and you may not even be able to remove the service until it's stopped). You might also want to check any filenames used in the key for the service, so that you can also remove the files associated with the service.

The system might require a reboot to refresh the entries.

 

You can also use the command line tool "sc" to delete a service (as well as a whole bunch of other things, like set it to manual/auto, stop/start it, etc) - though I found the former way a better one.

 

Here's some description on the ?sc' command:

Click to open image