Feb
1
2009

Kill all running apps with a double click

I have created a batch file which determines all the process started by the user and terminates all these processes.
It kills only the processes started by the user.These processes includes tray applications and background applications.

Using this batch file you can free up lots of RAM before starting any memory intensive application like Games or Video Encoders.You don’t have terminate each and every application to free up RAM.

This batch file works with both Windows XP and Windows Vista.

NOTE:This batch file cannot kill protected applications like that of Anti-Virus and Firewall

To kill all running apps just download kill.bat and double click on it.

Download it here.

SCREENSHOTS

Windows XP

Windows Vista


ADDING EXCEPTIONS

If you DO NOT want a particular process (example firefox.exe )to be stopped .

Modify the batch file like this.Add an extra line if not “%%i”==”firefox.exe” ( and extra closing bracket )just before the pause.(on the last but one line)

@echo off
title Kill all running apps – Bharat Balegere – AgniPulse.com
cd c:windowsSystem32
for /f “skip=3 tokens=1” %%i in (‘TASKLIST /FI “USERNAME ne NT AUTHORITYSYSTEM”‘) do (
if not “%%i”==”svchost.exe” (
if not “%%i”==”explorer.exe” (
if not “%%i”==”cmd.exe” (
if not “%%i”==”tasklist.exe” (
if not “%%i”==”firefox.exe” (
echo %%i
taskkill /f /im “%%i”
)
)
)
)
)
)
pause

«

»

17 Comments + Add Comment

  • when i start bat program, it opens a windows where is written:
    ERROR: impossible to recognise search filter.
    Hit a key to exit
    (it is written in italian language, i translated in english)

    • this batch file should be placed in the startup folder in the documents and settings. It can’t kill anything if it is no started before the naughty bugs start biting. Let me know if this solves the problem.

  • This doesn’t work on XP Home? (SP3) “‘TASKLIST’ is not recognized as an internal or external command, operable program or batch file. Press any key to continue…”

    • It works fine on XP SP3.
      Windows includes tasklist by default.
      Maybe your xp is a customized one which does not have tasklist.

      • I think tasklist is only in the Pro versions. Tested two home versions no tasklist.

      • Yes, it is not included in XP home. Like Kisk said, if you can get those two .exes off a Pro machine, just drop them in the system32 folder on your main drive and it will run from there.

  • So I ran this and now nothing shows on desktop
    its all empty
    how do i get things back?
    reboot?oh got firefox running by alt cont del and then typing in firefox
    to tech for me..an average user. needs more user friendly sstuff, ie idiot proof

    nee

    • Looks like you are using a different shell,something other than explorer.exe
      Just add the process name of your shell in the exceptions list.

      • sandbox ie sandboxed web browser?

    • It’s normal. the program will close explorer.exe

      go with shortcut CTRL-ALT-DELETE to start task manager and add explorer.exe in new task.

  • If want to run this on XP home, just download the two files below into the same directory as kill.bat:

    taskkill.exe
    tasklist.exe

  • Hello, i would like to thank this website, i am very, nice working blog. I will probably set a link from my site.

  • Nice Webblog, thanks for all the Info. I will re-visit later looking forward for more fine articles.

  • Great info, thanks for useful article. I am waiting for more

  • Thanks for taking the time to share this, I feel strongly about it and love reading more on this topic. If possible, as you gain knowledge, would you mind updating your blog with more information? It is extremely helpful for me.

  • Nice little script. I’m adapting it.

    XP Home, as said, lacks “taskkill” and “tasklist” but DOES have “tskill”. Any ways to work this into the script, rather than counting on the ability to drop files into Sys32?

  • I like this utility EXCEPT it won’t work with programs with a spaces in them.
    It also closes and will not pause at the end so I put pauses throughout but the last pause doesn’t work.

Leave a comment