Remove a Service from the Command Prompt
September 29, 2007
Ever have one of those programs that just won’t uninstall cleanly? I especially hate it when a program leaves a bunch of services that still manage to start, and lock files in their directory.
I ran across a nifty command to help remove at least the service portion of those programs, so that you can then remove the files in those folders. In a command prompt just type:
“SC delete %servicename%”
The tricky part to this is that the service name isn’t necessarily what appears in the services applet.
If you open the service that you want to delete, the top of the general tab has “Service name:” on top. That is the service name that you should use.
If we were removing the “Google Updater Service” in the picture below. We would use the name “gusvc”. Click on the picture for the full sized version.
Posted in
content rss


September 29th, 2007 at 8:10 am
Hey Mike, this is a really cool tip. Thanks. One thing that took me a minute was to see the “gusvc” on the screenshot. Would it be possible to add a red circle or something to guide the readers eye?
September 29th, 2007 at 8:31 am
Ever have one of those programs that just won’t uninstall cleanly?
You mean all of them? I haven’t met a Windows program that doesn’t at least leave behind it’s folder in Program Files, or files in your Documents and Settings folder, or registry entries, or…. You get the idea.
Anyway, this is a nice tip. I need to use it once in a while, and I always have to search it out every time because I can never remember it.
September 29th, 2007 at 10:23 am
@Phil, thanks for the suggestion. I placed a nice red oval around it. That should make it easier for people to find. I’ll have to keep that in mind for future posts.
@Art, I know. The thing I always hate is when it doesn’t remove the service, and then you can’t delete the folder because it is in use. I just don’t understand why uninstall scripts can’t be written a little better.