[Windows] Force service shutdown

On Windows, if a service is hanging in the STOPPING state, it's possible to forcefully stop it by following these steps.

First, find the service name. In the service properties, on the General tab, it's the first entry: Service name
Then, open a command prompt and type:

sc queryex SERVICE_NAME

to find the service PID

Lastly, type:

taskkill /PID SERVICE_PID /F

to forcefully kill the service with PID SERVICE_PID. Note that this allows you to also kill services with the NOT_STOPPABLE and IGNORES_SHUTDOWN flags.

No comments:

Post a Comment

With great power comes great responsibility.

Da grandi poteri derivano grandi responsabilità.