Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Tech Tips & Tricks
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > General Technology > Tech Tips & Tricks >
Autoexec.bat TIP

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
SeksiYANK's Avatar
Junior Member with 15 posts.
 
Join Date: Mar 2005
Experience: Intermediate
15-Mar-2005, 12:27 AM #1
Autoexec.bat TIP
If you want to clear internet privacy files(Such as history, cookies, and temp files) automatically on startup, you can simply add this text to your autoexec.bat file:

@ECHO OFF
IF EXIST C:\WINDOWS\SMARTDRV.EXE C:\WINDOWS\SMARTDRV.EXE 2048 16
IF EXIST C:\WINDOWS\TEMP\*.* DELTREE /Y C:\WINDOWS\TEMP\*.* > NUL
IF EXIST C:\WINDOWS\COOKIES\*.* DELTREE /Y C:\WINDOWS\COOKIES\*.* > NUL
IF EXIST C:\WINDOWS\RECENT\*.* DELTREE /Y C:\WINDOWS\RECENT\*.* > NUL
IF EXIST C:\WINDOWS\HISTORY\*.* DELTREE /Y C:\WINDOWS\HISTORY\*.* > NUL
IF EXIST C:\WINDOWS\TEMPOR~1\*.* DELTREE /Y C:\WINDOWS\TEMPOR~1\*.* > NUL

This will erase you internet history files on startup. You can also add other batch statements to be executed on startup here. Be creative!

I'm sure many of you already know about the autoexec file, but many don't, and it beats using a 3rd party application taking up more resources, IMO.

Beware, this will delete all your cookies, history, temporary internet files, and recent documents. And yes, unless you shred these files it is possible for them to be recovered(Shred those porn cookies! ).

-JC
blues_harp28's Avatar
Distinguished Member with 8,354 posts.
 
Join Date: Jan 2005
Location: London England
15-Mar-2005, 01:33 PM #2
Looks like an interesting tip,but remember Win98 does not need Autoexec.bat at start
up..
WhitPhil's Avatar
Computer Specs
Trusted Advisor - Gone but never forgotten with 9,280 posts.
 
Join Date: Oct 2000
Location: Whitby, Ontario
15-Mar-2005, 02:41 PM #3
Also remember that there "may be" files in the \Temp folder that are part of an install, and are expected to be there after the required boot.
blues_harp28's Avatar
Distinguished Member with 8,354 posts.
 
Join Date: Jan 2005
Location: London England
15-Mar-2005, 03:05 PM #4
That's interesting WhitPhil,many are advised to clear all temp files regularly, and may think that includes temp folders.maybe clarification is needed..
WhitPhil's Avatar
Computer Specs
Trusted Advisor - Gone but never forgotten with 9,280 posts.
 
Join Date: Oct 2000
Location: Whitby, Ontario
15-Mar-2005, 04:59 PM #5
There is no issue with the general clearing of \Temp files.

But, using the Autoexec to do it, means the files are being deleted at boot time.

If you just did an install, that placed files in \Temp folder and then asked you do do a reboot, the Autoexec would now delete them, before the install process was able to do, whatever it needed to do, with these files.
SeksiYANK's Avatar
Junior Member with 15 posts.
 
Join Date: Mar 2005
Experience: Intermediate
15-Mar-2005, 07:00 PM #6
Yeah, that is a problem whitphil.

If you don't want your \Temp files being deleted, simple edit out the 2 lines which delete it.

And yes, this only works for WinXP.
JohnWill's Avatar
Computer Specs
Moderator with 96,644 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
15-Mar-2005, 08:00 PM #7
Of course, you can also run scripts (batch files) when you startup or shutdown using group policies. I also use a temp clearing utility to clean a variety of temp files when I boot.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 9,329 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
16-Mar-2005, 02:46 PM #8
You have forgotten the single most important file on the computer.
INDEX.DAT, it holds every website/page/gif etc that you have ever viewed in Internet Explorer.
JohnWill's Avatar
Computer Specs
Moderator with 96,644 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
16-Mar-2005, 07:14 PM #9
Why is INDEX.DAT so important? I'm not ashamed of visiting Tech Support Guy, shucks, I'm even a moderator here.
Bold_Fortune's Avatar
Senior Member with 317 posts.
 
Join Date: Jan 2003
17-Mar-2005, 12:03 AM #10
I don't think XP uses AUTOEXEC.BAT.

There's all sorts of stuff about it in a Google search.

http://www.google.com/search?hl=en&q...=Google+Search
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 9,329 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
17-Mar-2005, 06:48 AM #11
JohnWill, it is so important not only as a security issue but because it just keeps growing, there is no way to clear it in normal Windows programs.
SeksiYANK's Avatar
Junior Member with 15 posts.
 
Join Date: Mar 2005
Experience: Intermediate
22-Mar-2005, 02:41 PM #12
Quote:
Originally Posted by Bold_Fortune
I don't think XP uses AUTOEXEC.BAT.

There's all sorts of stuff about it in a Google search.

http://www.google.com/search?hl=en&q...=Google+Search
-_- By default there is nothing in AUTOEXEC.BAT.

Why something only available in XP, that works for me and millions of others not work?
WhitPhil's Avatar
Computer Specs
Trusted Advisor - Gone but never forgotten with 9,280 posts.
 
Join Date: Oct 2000
Location: Whitby, Ontario
22-Mar-2005, 03:45 PM #13
Quote:
Originally Posted by SeksiYANK
-_- By default there is nothing in AUTOEXEC.BAT.

Why something only available in XP, that works for me and millions of others not work?
What you have posted will definitely work in Win9x, but not in XP.
JohnWill's Avatar
Computer Specs
Moderator with 96,644 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
22-Mar-2005, 04:25 PM #14
Actually, there's no reason that stuff in the AUTOEXEC.BAT file won't work with XP, it will be executed. OTOH, you can simply put a shortcut to a batch job in your startup group and it'll do the same thing.
WhitPhil's Avatar
Computer Specs
Trusted Advisor - Gone but never forgotten with 9,280 posts.
 
Join Date: Oct 2000
Location: Whitby, Ontario
22-Mar-2005, 07:12 PM #15
John:

A couple of reasons why I don't believe those commands will work.

1. Autoexec (on my PC at least) is not "executed" at boot time. This seems to be substantiated by the MS notes on Clean boot processing and Startup Troubleshooting, where there are no references to the file.

2. Even if the file were being processed, it would not do as advertised since the locations referenced for History, TIF, etc are those of Win9x, not XP.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 03:34 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.