Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Cookies on Reboot or Logon 2

Status
Not open for further replies.

devastator

IS-IT--Management
Jun 19, 2001
710
US
Is there a command to use to delete cookies on Win98 machines and win2000 pc's.

Thanks,
 
You could use cookie wall a freeware available from
It monitors all cookies as they arrive and gives the options to delete automatically, temporarily accept or accept. Ihave used it for a long time and it works great.
 
Or you could write a batch file and add to the autoexec.bat before windows startup. Write in NOTEPAD and save as DELCOOK onto your C drive, then rename the file extension from txt to bat. RUN MSCONFIG, AUTOEXEC.BAT, NEW, type in the name of your file (C:DELCOOK) before the last entry, APPLY and you should be done. You should type something like:

Del windows\cookies\*.*
exit

Let me know if it works

Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
Okay how about the cookies in Temporary Internet Files. I set the option in IE to "Empty temporary Internet files folder when browser is closed" but the cookies still remain.

 
In the batch file what do you type for it to answer Yes instead of prompting the user?


Thanks,
 
Here is a little utility that will wipe cookies and URLs off your hard drive. I use it regularly. It's called Spider.

"A little knowledge is a dangerous thing....." [idea]
 
Think I see what you mean. Try this instead of the earlier untried version.

Del windows\cookies\*.*
Del windows\tempor~1\*.txt
exit

Let me know if that does the trick.


Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
I have tried using cookie wall but you have to manually add the cookies you want to delete.

May have to look again at the spider software, maybe I missed something, but it didn't seem to remove the cookies even when checked. I don't know how well that is suppose to work with IE 6 but they had some papers on their website regarding this that I will look at again.

Tried the Del windows\cookies and tempor~1 but it always prompts for a yes and no to delete for the cookies, and can't find the .txt files in tempor~1. If I change the *.txt to *.* it will delete everything but the cookies. For some reason those won't delete unless I do it from IE browser options or manually from the cookie wall software.

So I guess I will continue to do some more research........

Thanks for the ideas....
 
I suppose that deleting everything past temporary internet files would be OK since WINDOWS rebuilds these at startup. That being the case, try using DELTREE instead of DEL. Try this one as below. There's got to be a way!!!!!!!

Deltree /Y windows\cookies\*.*
Deltree /Y windows\tempor~1\content.ie5\*.*
exit

Let me know if it works (should do).

Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
I've got a feeling that it deletes everything in the CONTENT.IE5 folder but then you've still got the cookies in the TEMPORARY INTERNET folder. The system folders and index.dat are recreated each time WINDOWS starts so just delete everything to the right of it as below

Deltree /Y windows\cookies\*.*
Deltree /Y windows\tempor~1\*.*
exit

That's gotta do it.
Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
Just by chance, I came across this batch file, written by someone who has been deleting cookies since they were first introduced. It's remarkably similar to mine, and I am informed it works every time. He also puts it into the autoexec.bat before windows boots.



Rem ** Cookie Kill Program **
REM *******************************************

deltree /y c:\windows\cookies\*.*
deltree /y c:\windows\tempor~1\*.*
pause
cls
REM Cookies deleted!



:end


I haven't tried it because I want my cookies to remain, but in theory it should work.



Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
Hullo Crusty & Devas,

Nice, useful thread....

I've got Opera, Navigator and IE junk to worry about, not to mention I have no intention of letting MS tell me what my favorites are.

I made a batch file named Cleanit, it is run in Autoexec.bat and also then available in case I ever want to use it without the rest of Autoexec.bat.

On some of the DelTrees I follow up with an MD to remake the directory just in case the application gets worried if it is not there.


I thought you might enjoy it...
Code:
@echo off

:--------------------------------------------------------------------------
:Cleanup Windows Messes...
: Delete harmful (usually) Windows directories in case some fool has
: installed them

:  Your installation may need some of these changed or removed...

  deltree /y c:\windows\applic*
  deltree /y c:\windows\system\MUI
  deltree /y c:\windows\applog
  deltree /y c:\windows\cookies
  deltree /y c:\windows\favori*
  deltree /y c:\windows\history
  deltree /y c:\windows\jnick0000\history
  deltree /y c:\windows\java
  deltree /y c:\windows\recent
  deltree /y c:\windows\sendto
  deltree /y c:\windows\tasks
  deltree /y c:\windows\temp*
  deltree /y c:\windows\tempor~1
  deltree /y c:\windows\web
REM   deltree /y c:\windows\profiles
  deltree /y "c:\windows\offline web pages"
  md c:\windows\TEMP
  deltree /y c:\windows\mui


:--------------------------------------------------------------------------
: clean up comm logs...

  listfile *.ht* /s C:\| sdel
  deltree /y "c:\windows\internet logs"

  deltree /y d:\temp
  md d:\temp

  set temp=D:\temp
  set tmp=D:\temp

  deltree /y d:\navtemp
  md d:\navtemp

  deltree /y E:\wpr\Nav304\Cache
  deltree /y E:\wpr\Nav304\Program\cache
  deltree /y E:\wpr\nav4\cache
  deltree /y E:\wpr\opera6\cache4
  deltree /y E:\wpr\opera\cache4
  deltree /y E:\wpr\opera6\Styles\cache.css
  md E:\wpr\opera6\cache4
  md E:\wpr\nav4\cache
  md E:\wpr\Nav304\Cache

  call killif c:\opera.log
  call killif c:\netscape.log

  deltree /y E:\wpr\nav4\plugins
  deltree /y E:\wpr\nav4\Users\default\cache
 
Jnicks

I'm glad you liked it. I always say that I will cure the problem, but I never ever give a timescale. Looking at what you have contributed above, I think I need at least a week to digest the info.

Thanks for your comments; they are warmly received. If I can help someone, I will, and the gratitude they show is a bonus.

Regards
Phil [roll1]
Si fractum non sit, noli id reficere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top