Many a times I have been in a situation where I need to delete a windows service and every time I end up “googling” to find the easiest/fastest way of doing this. Most of the posts in the search result talk about modifying the windows registry to delete the service, which isn’t always foolproof.
The easisest way of deleting a service is by using the sc.exe command line tool. This tools comes bundled with Windows and is probably the easiest way of maintaining and administering Windows Services.
Lets take an example of a totally useless service on Windows: Windows Search Service.
The first thing to do is to get the name of the Windows Service; What is shown in the service list (Control Panel -> Administrative Tools -> Services) is the Display name and this cannot be used as an input to sc.exe. The example service we have chosen has the name “WSearch” as shown below:
To delet the above service all I need to do is to execute the following command
sc delete WSearch
The SC tool comes in handy for many operations other than delete. A detailed description of this tool can be found in the following knowledge base article.
You can always disable a service, but if you are in a situation where you need to delete a service, the above tool definitely comes in handy.
Comments on this entry are closed.
Ahan! that’s a cool tip. Didn’t know about it at all! Thanks for the tip, I’m sure it’ll help a lot in making cmputr fast
That’s pretty useful piece of information. Didn’t know it. It seems I should now start learning about windows services because I’m going to delete all those which are useless.