Stop a hung service

From: Majed Mohammed Al Jetele <>;
Subject: Stop a hung service
Sent: Mon, May 6, 2013 10:25:22 AM

If you ever have trouble with a service being stuck in a 'starting' or 'stopping' state, you can run a couple of simple commands to kill the service.


Query the process

To kill the service you have to know its PID or Process ID. To find this just type the following in at a command prompt:

sc queryex servicename 

Replace 'servicename' with the services registry name. For example: Print Spooler is spooler. (See Picture)


Identify the PID

After running the query you will by presented with a list of details. You will want to locate the PID. (Highlighted)


Run the Taskkill command

Now that you have the PID, you can run the following command to kill the hung process:

taskkill /f /pid [PID] 

This will force kill the hung service. (See Picture)



" Disclaimer: This email message and its attachments (if any) are intended by the sender for the use of the addressee hereof. If you are not the intended recipient of this message, you are prohibited from disclosing, distributing, disseminating or otherwise using this message and ensure to delete email content from your system after notifying the sender by e-mail. The views or opinions expressed in this email are those of the author and are not necessarily those of Bank Albilad."


المشاركات الشائعة