[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

deleting temp files and cached files

Posted on 2002-03-18
7
Medium Priority
?
203 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 97

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 expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

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…
Want to create a VM?  Here's how you do it.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses

591 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