| View previous topic :: View next topic |
| Author |
Message |
mrgoat Newbie
Joined: 09 Oct 2005 Posts: 2
|
Posted: Oct 9th, 2005 11:28 AM Post subject: IE temp |
|
|
In my program i want it to delete IEs temporary files and cookies. Does anyone know how to do this. Its also complicated by the fact that the directory of this folder is not the same on all xp machines since its based on the name of the login your using. Example:
on bobbys computer its
C:\Documents and Settings\Bobby\Local Settings\Temporary Internet Files
but on Sallys computer its:
C:\Documents and Settings\Sally\Local Settings\Temporary Internet Files |
|
| Back to top |
|
DoobieKeebler Moderator

Joined: 17 Jun 2005 Posts: 254 Location: 181°15'2.003"W, 93°5'16.956"N
|
Posted: Oct 10th, 2005 08:57 AM Post subject: |
|
|
I found some code here that gives you the path to a number of folders. It looks confusing at first (and possibly second and twelve hundred thirty-ninth) but the form_load sub shows how easy it is to implement. So to get the folder you want should just be:
fGetSpecialFolder(CSIDL_DOCUMENTS) & "\..\Local Settings\Temporary Internet Files"
This is assuming that fGetSpecialFolder(CSIDL_DOCUMENTS) doesn't have a "\" at the end of it. _________________ Always take into account what a user would never ever in a million years do, because someone will.
"In theory, there's no difference between theory and practice. In practice, there is." -- Yogi Berra |
|
| Back to top |
|
mrgoat Newbie
Joined: 09 Oct 2005 Posts: 2
|
Posted: Oct 10th, 2005 11:23 AM Post subject: |
|
|
Ok great, thanks!
Now how do i go about deleting the contents of the folder? Im a real vb noob and have never handled external files at all. Also btw, how do i save my project as an EXE? I tried running it out of the release folder in my project, but whenever i move it to another comp it gives me an error. |
|
| Back to top |
|
DoobieKeebler Moderator

Joined: 17 Jun 2005 Posts: 254 Location: 181°15'2.003"W, 93°5'16.956"N
|
Posted: Oct 12th, 2005 09:51 AM Post subject: |
|
|
Sorry for the delay in getting back to you. I've been doing some searching for code and it looks like deleting these files is handled a little differently than normal. (If not, somebody please post and say "just blow the suckers away".) Naturally the code I'm finding does some other things like let you decide what to keep and what to blow away. Nothing that I can just say "add this code and in your Command1_Click sub say BlowAwayFiles(all)". I'll keep looking.
Also, on my computer at work (XP Pro) I have files where you are expecting them to be, but I also have them in \Windows\System32. But not on my laptop (XP Home). Lovely.
To make the EXE, click File > Make {Project Name}.exe. In the Make Project window that pops up, you can change the name of the exe file. You can also click the Options button at the bottom of that window and change some settings on the Make tab. Don't worry about what you don't understand and you shouldn't need to change anything on the Compile tab. All that will come later as your VB knowledge increases.
You might want to set the Icon property for your main form (and any other forms you have in the project). Otherwise you get that default icon that's to the left in the titlebar of your form. _________________ Always take into account what a user would never ever in a million years do, because someone will.
"In theory, there's no difference between theory and practice. In practice, there is." -- Yogi Berra |
|
| Back to top |
|
|