Solved

deleting temp files and cached files

Posted on 2002-03-18
7
186 Views
Last Modified: 2010-04-14
How can I make so all the temp files and cached files are deleted when you reboot the PC? Somekind of register hack?
I don't want to walk around to every computer to do this.
Thank you!
0
Comment
Question by:j_wildrose
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 11

Expert Comment

by:griessh
ID: 6877152
I am using Xteq's X-Setup. You will find the program at http://www.xteq.com/products/xset/index.html

======
Werner
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 6877336
I would suggest adding the following lines to your login script...

DEL %TEMP%\*.* /F /S /Q
DEL %TMP%\*.* /F /S /Q

The /F forces deleting of Read-Only files.
The /S deletes specified files from all sub directories
The /Q runs in "quite" mode, which suppresses the confirmation requests you typically get when doing a *.*

%TEMP% and %TMP% are environment variables that define the location of the temp directory for the user.

Of course, TEST THIS FIRST.  I know, most of the time, files in the temp folder are just that - temporary and deletable if they are left... but every now and again, someone saves things there or a programmer may screw up and make a file required to be there...
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 6877638
I would suggest using the following tool in your Login script

---------------
command line registry changes  batch file registry edit
To delete a key using Regedit, include a minus sign in front of the key path.

 Assume you had the following keys and values:

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff]
 "GuessWhat"="????"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\More]
 "HostName"="NameHost"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap]
 "GuessWhat"="????"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip]
 "ZipZap"="ZapZip"
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zap]
 "BlahBlah"="string"

 If you wanted to delete the entire Stuff service and the Zip subkey of the ZipZap service, you would
 submit the following within a .reg file (including the proper header for your version of Regedit):

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff]

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\More]

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip]

 If the file name was c:\regdel.reg, then:

 regedit /s c:\regdel.reg

 where the optional /s makes it silent.
-----------------

Now as to what to change in the registry :

I would download the free tweakui, and use a registry change tool to see what changes it makes when you turn on the auto deelte for Internet and cached files

atest version v1.33 of TweakUi from Microsoft
                    http://www.microsoft.com/windowsme/guide/tweakui.exe
See tweakui in the control panel .

Other info :

When I clear History in IE, not all cached Addresses are removed?
http://www.jsiinc.com/subd/tip1700/rh1763.htm
 After using Internet Options / General Tab / Clear History / Yes / OK, you still have cached addresses listed
 in the Address box:

 1. Exit Internet Explorer.

 2. Use Regedt32 to navigate to:

       HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs

 3. In the right hand pane, delete all Value Names that begin with URL (URL1, URL2, URL3, etc.)

 NOTE: If you don't delete all entries, the remaining entries must be in consecutive numerical order, starting with
 URL1. If they are not, rename them.

----------------

I hope this helps !
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 14

Accepted Solution

by:
AvonWyss earned 200 total points
ID: 6879497
Windows 2000 comes with the Disk Cleanup Tool (Start -> Programs -> Accessories -> System Tools -> Disk Cleanup). It will do what you want. It can also be automated, as explained in the following KB article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q253597
So just place a copy of the Disk Cleanup shortcut into your Startup folder, open it's properties, edit them as necessary, and say OK. This should solve your question.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6879501
Btw, if you have the computers in a domain, you can even set this as logoff script. It will then be run every time a user logs off (or shuts down the machine).
0
 

Author Comment

by:j_wildrose
ID: 6879567
Thank you! I will try this out.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6879679
Could you please explain why you felt that my answer was not worh an A grade? Thank you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question