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.





















Comments (48)
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
Posted by Stewart Johnson on February 5, 2005 3:31 AM
Excellent tip - thanks Stewart!
Posted by Chad Everett on February 7, 2005 3:04 PM
awesome!
Posted by Anonymous on April 19, 2005 7:40 PM
It really worked, when nothing else seemed to help anymore. Thanks a lot.
Posted by dss on May 3, 2005 9:09 AM
it works! thanx
Posted by mario jannelli on May 4, 2005 7:06 AM
I found that using the command line "sc" worked whereas just deleting the registry entry did not.
Posted by Chris Adamson on May 5, 2005 1:34 PM
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.
Posted by Brian on May 6, 2005 12:42 AM
thank you very much :-)
Posted by vladimir on May 11, 2005 9:34 AM
SC worked perfectly! Thanks for the tip!
Posted by Joseph on June 3, 2005 9:45 AM
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?
Posted by James on July 5, 2005 9:47 PM
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.
Posted by ripzy on July 26, 2005 10:29 AM
thanks, just what I needed...
Posted by Wiebe Tijsma on July 27, 2005 4:20 PM
Great stuff. sc just got added to the toolbox :)
Posted by Michael on August 26, 2005 10:17 AM
This works great on XP, but not on 2000. Please let me know what the equivalent cmd is!!
Thanks, Geo
Posted by george r on August 31, 2005 9:07 AM
Sweet, thanyou very much!
Posted by Nicholas Byfleet on October 1, 2005 11:08 PM
thanks for the tip! i've used it several times now to save my butt. ;)
Posted by MJB on November 16, 2005 4:48 PM
The error 1072 (mentioned by James in comment 10) is probably caused by the service being referenced by some other process so it can't be deleted. However, 1072 is "Marked for Deletion" according to my microsoft documentation, and the next time you reboot the service will be deleted.
Posted by dick on December 6, 2005 5:32 PM
Actually works for .NET services that will not remove with installUtil. Thanks!
Posted by David on January 24, 2006 7:36 PM
put MYSQL in ALL CAPS and try again... that worked for me
Posted by mj on February 23, 2006 5:22 PM
Excellent! Thanks a lot
Posted by Linh on March 10, 2006 3:32 AM
Excellent! I couldn't find a better tool
Posted by Jorge Escobar on April 4, 2006 7:59 PM
Just tried sc delete, and liked that better than just tearing it out of the registry.
Just be sure you use "sc delete [serviceName]" not the service description.
The services list displays the description, rather than the actual service name, so open the service you want to remove, and find out the actual name.
Posted by Nagashizar on May 12, 2006 9:19 AM
This is excellent. Simple, easy yet clearly understandable.
Posted by Murthy on May 26, 2006 11:11 AM
I did the SC and the regedit deletion. And it works great for me. Thanks a lot!
Posted by edison quinones on June 16, 2006 8:11 PM
Hi,
I have my windows service registry entry removed, but my service still exists there, in a status of 'stopping'. Any ideas of how to get this removed from my server.
I tried all different means of removing it from the system, but in vain.
Thank you,
Suman S. Chitemella
Posted by Suman on June 26, 2006 3:33 PM
EXCELLENT.. something i needed badly.
Posted by sr on June 27, 2006 12:44 PM
If the service shows "stopping", usually it is hung up. About the only way I've found to get around it is to reboot. Sorry.
Posted by Chad Everett on July 6, 2006 8:39 AM
thanks for the help, Stewart. I deleted XAMPP successfully, YAY!!!
Posted by slash on July 10, 2006 5:03 PM
I tried this as:
SC delete [DameWare Mini Remote Control] and it did not work. I am trying to remove the dameware service with a batch file.
Here is the error.
OpenService Failed: 1060
It says the service is not installed or doesn't exist. But it does. I can Stop the service with NET Stop so I believe I am entering the correct service name.
Any advice??
Posted by Bruce on July 31, 2006 10:13 AM
Awesome - thanks!
Posted by Jean on August 14, 2006 3:30 AM
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.
Posted by Fabien donato on August 21, 2006 5:12 PM
Thanks Stewart!
Posted by Jess on January 5, 2007 2:15 PM
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.
Posted by Borislav Dopudja on January 19, 2007 6:21 AM
There is also one important thing to mention - a lot of services are displayed with their display name. Go to the registry HKLM\SYSTEM\CurrentControlSet\Services look for your service and then delete it (or deal with it). You can also use "sc query" at command line.
Posted by Borislav Dopudja on January 19, 2007 6:25 AM
I want to delete a service from my windows 2000 professional. Please help.
Posted by Rakesh on February 1, 2007 10:11 AM
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.
Posted by Clinton on February 1, 2007 4:53 PM
thanks.....
Posted by emilherz on April 11, 2007 7:34 AM
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!
Posted by laza on June 27, 2007 4:45 AM
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.
Posted by OldBlindDog on June 27, 2007 9:17 PM
AWESOME!!!
Posted by Mehjabeen on March 24, 2008 3:02 AM
Guys,
I found it easier to use /UnRegServer option to remove from the Services List and from the Registry.
A Service name abc.exe can be unregistered using the following command.
abc.exe /UnRegServer
Hope this will be helpfull to all of you!
Thanks
NKR
Posted by N Kamleshwar Rao on April 2, 2008 7:14 AM
Hi
I am able to delete my service from Service list and registry but it still shows in Add/Remove programs under control panel. Even I have restarted my machine also.
Please help me out.
Thanks
Karuna
Posted by karuna on April 17, 2008 12:07 AM
Worked real good for me...
Posted by Jatin on April 21, 2008 12:08 PM
Thanks a million, I really appreciate your help. God bless U!
Posted by Rehan on April 22, 2008 2:28 PM
Hi,
I'm trying to get rid of a service on some Windows Server 2003 boxes I administer. The service in question is "NetBIOS TCP/IP Server", and the reason for wanting it gone is that the executable (c:\program files\networking\bin\netsrv.exe /server) simply doesn't exist. I don't know where this service comes from or why, but the lack of an actual executable causes the Computer Browser, Workstation and Server services to fail, thus somewhat crippling the servers.
Would it be safe to delete the service? Would this remove the imposed dependancy from the Workstation and Server services? If not, where else could I look for a remedy to this solution? The servers are all production servers and thus I'm reluctant to "just delete it and see what happens". Any pointers are welcomed.
Thanks.
Posted by Christer on April 24, 2008 9:53 AM
Any idea how to get a service back once you delete it? I'm thinking of deleting the windows time service, because its creating all kinds of problems with my time settings. But can I get it back later?
Posted by Norman on July 15, 2008 2:29 AM
Hi Norman -
Assuming that you haven't already deleted it, I would just export the key from regedit prior to doing so. Then in the worse-case scenario, you can just import it back.
Posted by Chad Everett on July 21, 2008 10:43 AM
thanks Stewart
the SC command saved my day :)
Sagi
Posted by sagi on August 27, 2008 9:56 AM