Kill a Stopping Service

By qualcom, Wednesday, 23rd February 2011 | 0 comments

 

  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).


Bookmark and Share


 

Comment on This Article

HTML is disabled and your e–mail address won't be published. Comments will be deleted if commenters leave a keyword instead of a name in the name field, if sites linked in the URL field are commercial in nature and not related to the blog, or if the comment simply doesn't add substance to the discussion.

Spam Prevention

In order to submit this form successfully, you must complete this question

Please match the colour       grey
Please match the colour
© 2012 Qualcom,
  • Qualcom House, Lower Kevin Street, Dublin 8, Ireland.
  • Phone: +353 1 475 0202
  • Fax: +353 1 475 0203
  • Email: info@qualcom.ie

Search

Search - Use spaces to separate your keywords