Stop a hung service 关闭一个无响应的windows 服务

2020-12-13 04:11

阅读:396

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.

 


C:\Users\yemen_000>sc queryex MSSQL$SQLEXPRESS

SERVICE_NAME: MSSQL$SQLEXPRESS
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 2184
FLAGS :

 


评论


亲,登录后才可以留言!