Solved

deleting temp files and cached files

Posted on 2002-03-18
7
144 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
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 95

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now