Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Delete Admin History and Temp Files

Status
Not open for further replies.

fugly

Technical User
Mar 21, 2002
29
0
0
US
I am writing a mini app to delete the cookies, history, temp files and other similar stuff. I started doing this to learn how to do it but, VB6 returns Permission Denied when I try delete the internet history and temp files. I am using DOS Batch file to do the work and calling it from the VB app. In the batch file I am using RMDIR to remove the Directory. Any ideas of ways around this?
 
Forgot using Win 2000 as operating system
 
You can get the address of for example cookies from "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cookies" and delete all cookies from there.Also for temp files.But pay atention that some temp files would not delete because theye are in use by a program at the moment. Behnam2204@yahoo.com
BehnamPro
 
So what you are saying is that deleting the reg key that holds the path for the cookies and temp files, is the same as deleting the actual files from the directory?
 
If that's what he meant (I doubt it) he was wtong. You can find the path from the reg key, then you delete all files in that path. But not all files in the temp directory will delete - some may be in use.

Deleting the entire directory is also a bad idea - programs that store files in that directory will crash or not work properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top