I needed to remove some services the other day and could not recall the name of the tool that allows you to easily add and remove services from Windows. I think it's srvany.exe, but I have no idea how recently it has been updated, and I couldn't find it anyway.

So I needed to remove a service and I couldn't figure it out. Until I stumbled across this piece of sage advice.

Namely, find your way to this registry location:

 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.

Comments (52)

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).

C:>sc delete
DESCRIPTION:
        Deletes a service entry from the registry.
        If the service is running, or another process has an
        open handle to the service, the service is simply marked
        for deletion.
USAGE:
        sc  delete [service name]

Cheers,
Stewart

Excellent tip - thanks Stewart!

awesome!

It really worked, when nothing else seemed to help anymore. Thanks a lot.

it works! thanx

I found that using the command line "sc" worked whereas just deleting the registry entry did not.

The command line tool 'sc' is better. The registry deletion just deletes it visually in some listings, it doesn't really delete the service itself.

thank you very much :-)

SC worked perfectly! Thanks for the tip!

hmmm...SC worked pretty good when I tried to delete a couple of services but when I tried to delete my corrupt MySQL daemon it threw an error:

"[SC] DeleteService FAILED 1072:"

Any ideas?

Excellent, thanks a lot :D.

James: First disable MySQL service, try to desinstall all MySQL packages, delete all files and folders (for MySQL, mysql admin etc) and then use sc command line tool. It works for me.

thanks, just what I needed...

Leave a comment