Monday, January 24, 2011

Kill process id in windows - force windows service to stop from stopping status


Kill process id in windows - force windows service to stop from stopping status

You can retrieve the PID for the process of the service through the command

sc queryex <servicename>

it returns some information like this

NOME_SERVIZIO: <servicename>
TIPO : 10 WIN32_OWN_PROCESS
STATO : 3 STOP_PENDING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
CODICE_USCITA_WIN32 : 0 (0x0)
CODICE_USCITA_SERVIZIO : 0 (0x0)
PUNTO_ARRESTO : 0x0
INDICAZIONE_ATTESA : 0x0
PID : 1824
FLAG :

Then you can stop the service by the command

taskkill /F /PID 1824 (the specific PID)


Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code