Solved

deleting temp files and cached files

Posted on 2002-03-18
7
180 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

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…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

738 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