Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

deleting temp files and cached files

Posted on 2002-03-18
7
Medium Priority
?
199 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 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 14

Accepted Solution

by:
AvonWyss earned 600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

972 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