How to force close a program in Windows

Ever have that program that misbehaves and doesn’t give you an option to click on the X? I’m looking at you steam.

I’ve seen an issue with Steam that has a clear window with no option to click on the X occasionally.

Here’s every way to kill a program in Windows assuming you can’t click on the X.

Fastest Method

Using the keyboard shortcut “Alt + F4“. However, you must be sure that the program you want to close you have at least clicked on that window of that program last or you will end up closing your most recent previously used program window. Sometimes this will fail to close out your program. If it does fail see below.

Fastest Method (Optional + SuperKill)

This method uses a free software called Super F4. Instead of using the keyboard mentioned in the previous method you use “Ctrl + Alt + F4” instead. For this method to work you need to install the Super F4 software which can be obtained here for free: https://stefansundin.github.io/superf4/

“SuperF4 kills the foreground program when you press Ctrl+Alt+F4. This is different from when you press Alt+F4. When you press Alt+F4, the program can refuse to quit. Windows only asks the program to quit, and lets it decide for itself what to do.

You can also kill a program by pressing Win+F4 and then clicking the window with your mouse cursor. You can press escape or the right mouse button to exit this mode without killing a program.

Some games have anti-keylogger protection, which may prevent SuperF4 from working (it can’t detect when you press Ctrl+Alt+F4). You can enable TimerCheck to use an alternate detection method.” – https://stefansundin.github.io/superf4/

Fastest Method (GUI Variation)

This uses a feature of SuperF4 called xkill. It makes the killing process more simple if you are able to see a portion of the window of the offending app if only to activate it.

Click on the “overflow” button

Click on the “Turtle Icon”

Select “xkill

This will give you a skull and crossbones mouse cursor. Whatever you click on next will have the process running it be killed instantly.

If you don’t want to kill anything right at that moment press escape “ESC

Fast Method

Press “Ctrl + Shift + Esc

Find the offending program

Right-Click on the program and click “End task

You can also highlight the program and click the “End Task” button.

This should have killed the program. If not see below.

Fast (Optional)

This method is the same as the one above but is more standard across different editions of windows whereas the previously mentioned fast is directly related to Windows 10.

Press “Ctrl + Alt + Del” – This is essentially a famous keyboard shortcut by now.

Click on “Task Manager”

You may see two different views of the task manager. The first type is the simplified view which looks like this:

This image has an empty alt attribute; its file name is image-3.png

Or the Advanced view which can be enabled by clicking here:

Then the task manager will look like this and you can end the task in the same way.

Advanced Method (Using the Command Line Interface Program “Command Prompt”)

Click on Start

Then type CMD. Click on “Run as Administrator

type “tasklist” into the black command prompt window and press enter. This will give us a full listing of all of the running processes.

You’ll see some applications run multiple processes. For example in this image you can see that Chrome and Discord have multiple processes running. Rather than killing each individual process you can

Let’s kill the Discord program for example. Since there are multiple executables “.exe”s running we want to do this with a single command instead of using the Process ID (PID) number. Also, let’s figure for example that we don’t know the full name of the application and insert a basic regular expression using the asterisk ” * ” on the end of the word to mean “anything after this point doesn’t have to match”

tasklist | findstr /i Disco*

This runs the tasklist program that we just ran then pipes that output into the “findstr” (find string) program using the “/i” switch to indicate Case-Sensitivity set to Disabled. You will notice that now our listing only shows Discord.exe processes.

Finally, to perform the kill operation based on this logic we can use the “taskkill program”

taskkill /f /im Disco*

or

taskkill /f /im Discord.exe

This will stop all disco… applications and you will receiving a confirmation message.

Now since it was misbehaving and you had it open it’s probably a program that you want to use again. To start it back up you can use the following command message

start Discord.exe

Leave a Reply

Your email address will not be published. Required fields are marked *