Thursday 1 December 2016

How Kill a windows Service

C:\Windows\System32>sc queryex  servicesname 

Result get the PID

SERVICE_NAME: servicesname
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 3  STOP_PENDING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
        PID                : 944
        FLAGS     

run the below cmd

C:\Windows\System32>taskkill /PID 944 /F