How do I kill a process that does not shut down gracefully or hangs?
8:53 AM
To kill a process that does not stop gracefully when you issue a Stop
command from the Services GUI window you can use the built-in command
line tool taskkill.exe. The following shows an example on its syntax:
Example Code - Killing a PID (4584)
C:\>taskkill /pid 4584
SUCCESS: Sent termination signal to the process with PID 4584.
Example Code - Killing a Process Name (calc.exe)
C:\>taskkill /im calc.exe
SUCCESS: Sent termination signal to the process "calc.exe" with PID 3948.
Example Code - Killing a PID (4584)
C:\>taskkill /pid 4584
SUCCESS: Sent termination signal to the process with PID 4584.
Example Code - Killing a Process Name (calc.exe)
C:\>taskkill /im calc.exe
SUCCESS: Sent termination signal to the process "calc.exe" with PID 3948.
0 comments