About This Site

I'm a Tech Guy for over 30 Years Knowledge of Computers, Networks, PC Gadgets. This site is to be used to share some of my knowledge and reviews
If you find info useful from this site then please consider to Donate

Kill Windows NT Service That Hangs On Starting Or Stopping

Had to use this a few times. Comes in handy. I got this from Kuhnline.com Thanks!

 

  1. Go to the command-prompt and query the service (e.g. the SMTP service) by using sc:

    sc queryex SMTPSvc

  2. This will give you the following information:

    SERVICE_NAME: SMTPSvc
    TYPE               : 20  WIN32_SHARE_PROCESS
    STATE              : 4  RUNNING
    (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
    WIN32_EXIT_CODE    : 0  (0x0)
    SERVICE_EXIT_CODE  : 0  (0x0)
    CHECKPOINT         : 0x0
    WAIT_HINT          : 0x0
    PID                : 388
    FLAGS              :

    or something like this (the “state” will mention stopping).

  3. Over here you can find the process identifier (PID), so it’s pretty easy to kill the associated process either by using the task manager or by using taskkill:

    taskkill /PID 388 /F

    where the /F flag is needed to force the process kill (first try without the flag).

Print Friendly, PDF & Email

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>