Bharat Balegere 's Undocumented Tech Tips

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

 

Like This Post ?

RSS Digg Twitter StumbleUpon Delicious Technorati Reddit Facebook Mixx Diigo Google Yahoo

10 Comments

  • avavass says:

    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)

    • Dave says:

      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.

  • jr2 says:

    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…”

    • Bharat Balegere says:

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

      • nemotech says:

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

      • Ken Helms says:

        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.

  • myardor says:

    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

  • kisk says:

    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

Trackbacks and Pingbacks

Leave a Comment


Name (required)

Mail (will not be published) (required)

Website

Comment

Spam Protection by WP-SpamFree