How to Force Application Termination on Microsoft Windows

On Microsoft Windows, an application can stop responding, and closing it using the GUI might be impossible. If you have ever found yourself in such a situation, I can tell you that you can close such an application using the Windows command line utilit…


This content originally appeared on DEV Community and was authored by Habdul Hazeez

On Microsoft Windows, an application can stop responding, and closing it using the GUI might be impossible. If you have ever found yourself in such a situation, I can tell you that you can close such an application using the Windows command line utility. The following steps are how to go about it.

1. Open the Windows CMD

There are several ways to do this. You can click the Start menu icon (on Windows 11) and search for Command Prompt. Or, if you want, you can open CMD by doing the following:

  1. Open the Windows Run dialog box by pressing and holding both the Windows Key and R on your keyboard.
  2. Type cmd and press the enter key on your keyboard.

2. Search for the Application

Note the name of the application that you'd like to forcefully shut down. Then type the following in the CMD. The successful execution of the following command will list all the current running applications for the current user (which is your user account).

tasklist

3. Note the Application's Process ID

From the output of the tasklist command, note the PID of the application that you want to close. For example, we would like to close the application Typora and it has many PID as seen below. Meanwhile, the first PID i.e., 8576 is all we need for now.

Typora.exe                    8576 Console                    1    108,700 K
Typora.exe                    9392 Console                    1    116,552 K
Typora.exe                    2052 Console                    1     43,556 K
Typora.exe                   11464 Console                    1    185,476 K
cmd.exe                       9424 Console                    1      5,900 K
conhost.exe                  11052 Console                    1      9,856 K
OpenConsole.exe              11424 Console                    1     19,424 K
WindowsTerminal.exe          11096 Console                    1     94,264 K
tasklist.exe                  7664 Console                    1     11,664 K

4. Close the Application by Force

Armed with the application's PID, you can terminate it by force using the taskkill command. Now, to terminate an application using the tasskill command, you need to pass it the /f flag, the /PID flag, and the PID number itself. For example, taskkill /f /PID [N]. Where N is the PID number. From the output of tasklist in the previous step, that's 8576 for Typora.

Therefore, we'll enter the following. In your case, replace 8576 with the process ID that you got from step 3. Then click the Enter key on your keyboard to complete the operation.

taskkill /f /PID 8576

5. Visual Confirmation

The GIF image below shows all the previous steps in action.

Force application termination in Microsoft Windows


This content originally appeared on DEV Community and was authored by Habdul Hazeez


Print Share Comment Cite Upload Translate Updates
APA

Habdul Hazeez | Sciencx (2025-11-09T08:40:56+00:00) How to Force Application Termination on Microsoft Windows. Retrieved from https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/

MLA
" » How to Force Application Termination on Microsoft Windows." Habdul Hazeez | Sciencx - Sunday November 9, 2025, https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/
HARVARD
Habdul Hazeez | Sciencx Sunday November 9, 2025 » How to Force Application Termination on Microsoft Windows., viewed ,<https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/>
VANCOUVER
Habdul Hazeez | Sciencx - » How to Force Application Termination on Microsoft Windows. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/
CHICAGO
" » How to Force Application Termination on Microsoft Windows." Habdul Hazeez | Sciencx - Accessed . https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/
IEEE
" » How to Force Application Termination on Microsoft Windows." Habdul Hazeez | Sciencx [Online]. Available: https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/. [Accessed: ]
rf:citation
» How to Force Application Termination on Microsoft Windows | Habdul Hazeez | Sciencx | https://www.scien.cx/2025/11/09/how-to-force-application-termination-on-microsoft-windows/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.