Computer Tips and Tricks
Get the latest posts via rss
Showing posts with label taskkill. Show all posts
Showing posts with label taskkill. Show all posts

Tuesday, 22 December 2009

Killing a hanging Windows Service

Services have the tendency to hang during a "Starting" or "Stopping" state causing a program to fail. Usually a reboot can correct the problem, but this is not always appropriate. There is an alternative in the form of an "sc query" and a "taskkill" commands.

The "sc query" is used to identify the PID or process identifier of a running service. This is required to perform the "taskkill" command.

To obtain the PID, first find out the exact name of the service you wish to kill. It can be found in the service properties.