Delete a Windows Service Using the Command Line

Developing and debugging Windows Services in Visual Studio 2005 usually means creating setup projects to install and uninstall them. One of the quirks of using installers, however, is that sometimes the Windows service fails to uninstall. Below is the manual way of deleting or uninstalling a Windows service using the command line in Windows Vista and XP.

C:>sc delete [service name]

The utility also has other functions relating to Windows Services. Check them out.

If you liked this little howto. Please, consider sharing it. Thank you!

I CANNOT be held responsible for the use of this utility. Please, be careful.

Tags: , , , , , , ,

Bookmark and Share


Jul 16, 2008 2:48 AM
SM4JL Thanks. Helped me to get rid of one service I wasn't able to uninstall other way.
Jul 16, 2008 8:50 AM
Carlo You're welcome!
Oct 20, 2008 9:32 AM
rich thanks!! this really helped me alot. i used to do it through the registry, and who knows if it actually worked.
Raju Kadam
Mar 26, 2009 2:23 PM
Raju Kadam worked for me!
Short and sweet solution!
Apr 6, 2009 10:10 PM
Ajay That's Cool, Worked for me and thanks a lot
Steve Katra
Jun 28, 2009 3:19 PM
Steve Katra This worked very well for me.

Steve Katra
Aug 9, 2009 9:27 PM
dennis Thank you for your information on deleting a services thru command line, I need it fast and you where their.
Aug 19, 2009 6:04 AM
Pavol Thanks, it helped me a lot!
Oct 5, 2009 2:43 AM
yenkay Thanks...It worked for me too...
Simple and very useful command...
Mar 1, 2010 10:10 AM
Vimal Worked fine. cd to folder where service is installed. While running above command give name of service as appear under admin tool - services. Thanks for your help.
Aug 12, 2010 5:47 AM
Noam Thanks.

It helped me to get rid of uninstalled service, now I need to restart.


Want to leave a comment?