How to kill hanged program from command prompt in Windows 10

Task Manager is the right place to kill a program that hangs or turns into not responding. While you can make them auto kill but sometimes it’s not preferable, and sometimes even the task manager hangs. Here is a nifty trick which lets you kill hanged program from the command prompt in Windows 10

Windows has two programs called as Taskkill and Tasklist. While the former can kill running programs, the following lists all the running applications. You need both of them as taskkill needs a PID or Process ID of that program, which you can find through the tasklist command. So let’s give it a run. That’s is how Task List looks like when you run tasklist.exe

kill hanged program command prompt

How to kill the hanged program from the command prompt in Windows 10

  • Open Run prompt using Win + R and type cmd.
  • First, let’s figure out the PID of the program you want to kill using tasklist.exe.
  • Note the PID, and then type taskkill /PID and hit enter.
  • It will terminate the program.

kill hanged program command prompt

How to use Taskkill with different options

TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

Description: This command line tool can be used to end one or more processes. Processes can be killed by the process id or image name.

Parameter List:

  • /F Specifies to terminate the process(es) forcefully.
  • /PID process id Specifies the PID of the process that has to be terminated.
  • /IM image name Specifies the image name of the process that has to be terminated. Wildcard ‘*’ can be used to specify all image names.
  • /T Tree kill: ends the specified process and any child processes which were started by it.

If there is an application that has sub-applications or child program, you need to kill all the processes. Get the PID from Task List and then kill it forcefully using /F option or /T for the child process.


  1. Hi,
    In the Task Manager under application tab, the list of task needs to be displayed in command line. The command tasklist displays the process. But I require only the application tab details, also need the Image name under Process Tab.

    Is there a command to display the task name under application tab in command line

Leave a Reply