How to kill Windows process automatically with a .BAT file

One of the easiest ways to speed up Windows is closing unnecessary taks and processes. That's why sometimes we want to kill many Windows programs / processes, but we do not want to disable neither manually nor forever. It could be a group of programs that we rarely use, but which require some system process running permanently. So when we turn on the computer with other task in mind, we don't want these unneeded processes consuming Windows resources continuously.

That's why we are going to create a batch file (.BAT) which with a double click on it will kill as many Windows processes as we want.

So let's open Windows Notepad (Shortcuts: "Start Menu / Run / Notepad" or "Windows Key + R / Notepad") and then typing:

TASKKILL /IM "process name" /F



"IM" lets us input the name of the Windows process to kill, and "/F" enforces such process closing action and kills them forcefully preventing confirmation prompts or hanged.

If we want to specify a group of programs to close, we should only repeat the previous line of code with each process name, inside the same file.

Example file:


Once this file is ready, we should keep it using File / Save as...

And after the name chosen for this file we should appen the .bat file extension. That's how we create a Batman file... well, no, a .BAT file (batch process).

To save a .bat file using notepad we have to change the file type, which is by default Text Files (*.txt), choosing All Files. This is very important. Otherwise, we would just creating a text document called "whatever.bat".txt, and that won't work.

Let's also pick the ANSI encoding type for this process kill bat file.

And finally, we click on the save button to store the file.

How to save a bat file

By default, this creates a file with an icon like this icon, depending on your own system icon configuration set.

Now, whenever we want to close every Windows process specified in the file, we only need to double click that file, and it will perform the automatic process killing for us.

Running a .BAT file is like running the Windows command prompt code to close all the processes, but these batch files perform all the necessary actions automatically, in no time.

We can also check a complete and detailed list of the values and parameters that we could add after "TASKKILL" just clicking in Start / Run (Windows + R), typing cmd (to run the Windows command prompt), and typing at this window: TASKKILL/?.

Running processes with .BAT

If we want to reopen every Windows process previously killed with our .BAT file, with no need to reboot Windows, we can automatically perform the reverse operation, creating another .BAT (same process as before) this way:

START "Name" "C:\...path.exe" START "Name" "C:\...path.exe" START "Name" "C:\...path.exe"

To specify the full path of the target program we can only use ASCII text, with no accents or other special characters.


START "Paint" "C:\WINDOWS\System32\mspaint.exe" START "Notepad" "C:\WINDOWS\notepad.exe" START "Calculadora" "C:\WINDOWS\System32\calc.exe"

NOTE: This trick to run or kill Windows process also works to create a .BAT file to automatically open our most used apps (using the "START" Windows command), and another .BAT to kill these programs (the TASKKILL command file).