Jump to content
Sign in to follow this  

Clear out all those useless programs from memory

Recommended Posts


I occasionally need to clear out all the crud in memory, so I have written a little script to do it and thought someone may find it useful. It uses process explorer from Sysinternals to produce a list of active processes. Processes that have been commented "REMOVE" are closed.

To comment a process in Process explorer, just right click it and enter some text in the box.

#include <array.au3>
Opt("WinTitleMatchMode", 2)

;Run Process Explorer and save text file.
WinWait("Process Explorer")
WinActivate("Process Explorer")



;Read into array
while 1
    If $file = -1 Then
    $info = StringSplit($line,chr(9))
    ;Kill Process off
    if $info[6]="REMOVE" then 
       if ProcessExists($info[1]) then ProcessClose($info[1])
    ;Increment Counter

Edited by xircon

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.