Kill the hang service in window services.msc

Kill Window Service that hang on state “STOPPING” or “STARTING” in services.msc window

 
Suppose you are on services screen on window and you started the service by right click and start the service then it show status starting but does not respond beyond (means hanged state). Without restart the window machine you can kill the service by following commands from command prompt:
 
1. Check the service name with following command:

sc queryex OracleDBconsolePEGA
SERVICE_NAME: OracleDBconsolePEGA
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x2a
WAIT_HINT : 0x2710
PID : 94196
FLAGS :

2. It will give you the Pid of the services on which its running.
 
3. Kill service by taskkill command:

C:\>taskkill /pid 94196
ERROR: The process with PID 94196 could not be terminated.
Reason: This process can only be terminated forcefully (with /F option).C:\>taskkill /pid 94196 /F
SUCCESS: The process with PID 94196 has been terminated.

  

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s