Killing a stuck Windows Service

Hi

I guess all of us met the phenomenon when a service refuses to stop and stuck on “Stopping” status.

well, there is a remedy to this by following this short procedure:

1. Identify the PID of the rogue service. open cmd and type: sc queryex

you will receive a long list of available services. you can also type sc queryex > c:\ServiceList.txt to send the output to a text file.

2. search the list of services for the problematic service:

SERVICE_NAME: Spooler
DISPLAY_NAME: Print Spooler
TYPE               : 110  WIN32_OWN_PROCESS (interactive)
STATE              : 3  STOP_PENDING

(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0
PID                : 1800
FLAGS              :

After you identified the service on the SERVICE_NAME line, notice the PID. you will need this number.

3. Using taskkill command, you can kill the rogue service now by typing: taskkill /PID 1800 /F

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

One thought on “Killing a stuck Windows Service”

  1. This was life saving, mid acquisition and almost ready to lose everything, your post was the only of I bet a hundred I read that broke it down on how to kill a stuck service.

    thanks a ton!

    Script that saved the day
    Cmd run as Administrator

    sc \\machine queryex

    SERVICE_NAME: TermService
    DISPLAY_NAME: Remote Desktop Services
    TYPE : 30 WIN32
    STATE : 3 STOP_PENDING
    (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
    WIN32_EXIT_CODE : 0 (0x0)
    SERVICE_EXIT_CODE : 0 (0x0)
    CHECKPOINT : 0x1
    WAIT_HINT : 0xea60
    PID : 85536
    FLAGS :

    U:\>taskkill /S Machine /PID 85536 /F
    SUCCESS: The process with PID 85536 has been terminated.

    Couldn’t kill it, unable to log in, everything. Just crazy. Would have lost hours/days of work otherwise.
    Trent Greenawalt

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.