Killing a hanged Windows service

A hanged service looks like this (as you can see, all Start/Stop/Pause/Resume buttons are disabled):

To kill this service, first note the service name. On the screenshot above, it is ‘EntropySoftCFS’ (ie: the first thing displayed in the “General” tab).

Then, open a DOS shell and run the ‘sc queryex’ command to retrieve the service PID, then use the ‘taskkill’ command to… well, kill it !

C:\>sc queryex EntropySoftCFS

SERVICE_NAME: EntropySoftCFS
TYPE               : 10  WIN32_OWN_PROCESS
STATE              : 2  START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))

WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x1
WAIT_HINT          : 0xbb8
PID                : 3756
FLAGS              :

C:\>taskkill /PID 3756 /F
SUCCESS: The process with PID 3756 has been terminated.

Laurent KUBASKI

Advertisements

About lkubaski
www.kubaski.com

4 Responses to Killing a hanged Windows service

  1. Pingback: Killing a hanged Windows service « kktechinnovation

  2. matt says:

    You can also use the Taks Manager or Procexp to isolate and kill the beast… Once you have the process name, unless it’s svchost.exe, it also does the job 🙂

  3. thisisavalidemail@wordpress.com says:

    Getting “ERROR: The process with PID #### could not be terminated. Reason: Access is denied.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: