Jump to content

TempDelete.au3 - Cleans Temp Directories


jennico
 Share

Recommended Posts

Probably the biggest cleaning tool you've ever seen

(well, my memory is brilliant, no ? :) )

by mrbond007.

Space Regain

dunno if still working, if they have includes

:o

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

By the way, if you are looking for the cache paths for IE then look in

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Cleaning your Temporary Internet Files and History is completely useless if you do not delete the index.dat

You can add them to the PendingFileRenameOperations in the registry

Registry Key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager", "PendingFileRenameOperations", "REG_MULTI_SZ", "\??\C:\Documents and Settings\User\Local Settings\Temporary Internet Files\Content.IE5\index.dat")

You can add more files you will have to add & @CRLF after each file

One thing

Be carefull when retrieving folder information through the registry

add several checks is the temp folder not your root folder or is the registry key found ..

otherwise you will clean your complete disk

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

Cleaning your Temporary Internet Files and History is completely useless if you do not delete the index.dat

seems to be a misunderstanding. i have to mention, TempDelete is not made to hide your traces, it is made to free some folders from junk. in this way, it sure makes sense to delete history without index.dat.

Temporary Internet files can really contain some hundreds of MB, if you don't care for it !

thank you for telling me more regions where to find temps. i will add them. i suspected there are more.

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

Be carefull when retrieving folder information through the registry

add several checks is the temp folder not your root folder or is the registry key found ..

otherwise you will clean your complete disk

good idea. my god, hope this didn't happen to anyone ?????????

j.

for now, you can check the folder in the edit box and kill script, just in case....

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

By the way, if you are looking for the cache paths for IE then look in

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache

this does not contain more info than "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", what i am using. :)

does it on other machines perhaps ?

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

ay, nooooo. i don't intend such a thing. (what's the use of cleaning window positions ? and does this delete all *.ini it finds on HDD ? :) horrible !)

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

i changed the script according to Emiel Wieldraaijer's proposals (thx for those) in post 1.

- deletes index.dat (on next reboot)

- checks plausability of path names (more secure)

i could not find any more folders than before, if anyone has more hints...

@firefox:

really don't know how to and i don't want to do it.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

okay, i will add that. "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Recent". easy to do.

any more ? maybe firefox/opera/netscape junk folders ?

edit:

i checked "recent". is very small and very hidden. mine is 172 kb and i never deleted it. but okay.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

some folders are never (?) shown. like "History", "Recent", "Recycler". but you can access them when you know where they are.

i would really like to know how to make them visible on XP. (i don't mean the "normal" system folders that you can unhide by setting the folder options).

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

there has been done a bigger tool in autoit before. i don't remember the name. XPClean i think. or CleanScript ? i think, geosoft made that ? :)

this does really a lot of cleanups, but the more clean the more dangerous. i would not dare to script anything that deletes registry entries. i just wanted to make a simple and harmless tool.

@SoftVoile :

half the work is done yet. look into the registry: in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders you find recent documents and other stuff to delete.

i will have to look up in the registry where netscape and firefox store their settings, and then they can be deleted as well.

the rest is easy to realize. maybe i do it, if it is not too much work.

j.

how to delete index.dat file?

Registry Key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager", "PendingFileRenameOperations", "REG_MULTI_SZ", "\??\C:\Documents and Settings\User\Local Settings\Temporary Internet Files\Content.IE5\index.dat")

You can add more files you will have to add & @CRLF after each file

'C:\Documents and Settings\Y2005\Cookies\index.dat' is locked.....

Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them.
Link to comment
Share on other sites

can you convert it to autoit?

Here's what you can do to automatically wipe out the index.dat files on a Windows 2000 Professional or a Windows XP Professional machine during each shutdown. This automatic method does not work on Windows XP Home edition.

Instructions for Windows XP Home users:

Windows XP Home users can delete the files manually. Follow the instructions below to create the IndexDat.cmd file. Save the edited IndexDat.cmd file to your hard drive at the root of C:\. Reboot your PC and when your PC is just starting to bootup, you can keep tapping F8 until you see the Windows Advanced Options Menu. Use your arrow keys to choose "Safe Mode with Command Prompt" and press Enter. At the C:\ prompt type "C:\indexdat.cmd" without the quotes and press enter to run the IndexDat.cmd file. After the script has run, press Ctrl->Alt->Delete on your keyboard and select Shut Down->Restart to restart your PC.

Instructions for Windows 2000/XP Professional users:

Index.dat files keep a record of every website you have ever visited and the one in the Content.ie5 folder just keeps growing and growing. It's OK to delete the Index.dat files as windows will created new empty files after rebooting.

Open Notepad and type the following:

Del "C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\UserData\index.dat"

Del "C:\Documents and Settings\Administrator\Cookies\index.dat"

Del "C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\index.dat"

Del "C:\Documents and Settings\Administrator\UserData\index.dat"

Del "C:\Documents and Settings\Default User\Cookies\index.dat"

Del "C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\index.dat"

Del "C:\Documents and Settings\Local Service\Cookies\index.dat"

In this example, the username is Administrator. Replace Administrator with your username. You will need to add any additional users to the script.

Do not confuse All Users, Default User, LocalService or NetworkService as being users.

In notepad Save the file with the file name "IndexDat.cmd" (with the quotes). Your file should now be named IndexDat.cmd. It should not be named IndexDat.cmd.txt.

Copy the IndexDat.cmd file to the following folder:

C:\Winnt\System32\GroupPolicy\Machine\Scripts\Shut down

or

C:\Windows\System32\GroupPolicy\Machine\Scripts\Sh utdown

depending on where you operating system resides.

So IndexDat.cmd should now be in the Shutdown folder.

Now go to Start & Run and type in gpedit.msc and click OK. Open up Computer Configuration->Windows Settings->Scripts (Startup/Shutdown) and double click Shutdown. Click the Add button and browse to the IndexDat.cmd file in the Shutdown folder. Highlight the file, click Open and OK twice. Every time you shut your computer down, it will wipe out the index.dat files.

Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them.
Link to comment
Share on other sites

well, i made it in the new version of my script. you have to put index.dat into a registry key, so it will be deleted on next reboot. you quoted the right registry entry. also look it up in help file under RegWrite(). it's kind of tricky, but just one line.

cheers j.

edit:

$pe = "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager"
$pv = "PendingFileRenameOperations"
If StringRight($File, 10) = "\index.dat"  Then RegWrite($pe, $pv, "REG_MULTI_SZ", "\??\" & _
                FileGetShortName($File) & @LF & @LF & RegRead($pe, $pv))

the way explained in your quotation (.cmd in DOS mode) is very complicated, the solution above does it automatical on reboot. well, it should do it, at least.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...