Manually Remove a Windows Service

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.


Posted

in

Comments

52 responses to “Manually Remove a Windows Service”

  1. Mehjabeen Avatar
    Mehjabeen

    AWESOME!!!

  2. OldBlindDog Avatar

    I can end a process that is hung ‘stopping’ without rebooting by using [End Process] in the Task Manager. Shouldn’t there be an equivalent command or scripting element?
    I need a script to run periodically to check the service, end it if it’s hung, then restart it. Any ideas?
    Seems like the sc query, sc delete, sc create, and sc configure might all offer something, if we could just get the hung service stopped.

  3. laza Avatar
    laza

    sc worked great on 2003 server, it was a production environment and just deleting the key from the registry wasn’t enough because server restart was required. SC fixed it all, great post!

  4. emilherz Avatar
    emilherz

    thanks…..

  5. Clinton Avatar
    Clinton

    The delete a service tool for Win 2K is called delsvr.exe. It is available from here.

    It was very difficult to locate on the Microsoft web site – took me a at least an hour searching to track it down!

    For the complete Win 2K resource kit, see here.

  6. Rakesh Avatar
    Rakesh

    I want to delete a service from my windows 2000 professional. Please help.

  7. Borislav Dopudja Avatar

    There is also one important thing to mention – a lot of services are displayed with their display name. Go to the registry HKLMSYSTEMCurrentControlSetServices look for your service and then delete it (or deal with it). You can also use “sc query” at command line.

  8. Borislav Dopudja Avatar

    Great, everything works.

    I would like to mention that command line sc delete [service name] is “better” way to delete (or to deal) with service, because SC undramatically updates service database and registry, while just deleting service from registry needs one restart before everything sits in place.

  9. Jess Avatar
    Jess

    Thanks Stewart!

  10. Fabien donato Avatar
    Fabien donato

    Hi, I am running with W2000 Pro SP4, I do not have access to the sc command. -:(

    Can I download an exe from somewhere or any equivalent?

    Thanks.