|   Login    |   February 23, 2020    |   Knowledge Base  >  Knowledge Base Systems  >  Windows  >  kill stubborn windows service.
search:   
Phone: (480) 722-1227
Toll Free: (888) 722-1227
kill stubborn windows service.
Last Post 06 Feb 2008 06:24 PM by Chris Muench. 0 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chris MuenchUser is Offline
New Member
New Member
Posts:57

--
06 Feb 2008 06:24 PM  

the following will let you kill a stubborn service.

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

Please be careful when you do this; it's useful for emergencies but you shouldn't use it on a regular basis (use it as a last chance to solve the problem or to avoid the need of a reboot in an exceptional situation). It can even be used to stop a service that has the "NOT-STOPPABLE" and/or "IGNORES_SHUTDOWN" flag set (e.g. Terminal Services on a Windows Server 2003 is non-stoppable), at least when it's not hosted in the system process. You can query all this information by means of the sc command.

 

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sc.mspx

You are not authorized to post a reply.

Active Forums 4.2
Vigilant Technologies
Vigilant Technologies is a certified 8(a), Veteran Owned company headquartered in Chandler, Arizona. We provide products, services and enterprise-wide integration of innovative IT solutions to commercial, Federal, State and Local government clients. Our Leading edge services include Private/Hybrid Cloud, Server Consolidation, Visualization implementation, and Infrastructure Management.
Engage with us
Copyright 2006 - 2013 Vigilant Support   |  Privacy Statement  |  Terms Of Use
Uluslararası evden eve nakliyat