Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delete temporary files on client on shutdown

694 views
Skip to first unread message

barkley bees

unread,
Feb 6, 2008, 8:21:46 PM2/6/08
to
We would like to implement a process so that client PC's (Windows XP) will
automatically clear all temporary files (IE, Outlook, etc) upon shutdown/log
off. Is this possible to implement and distribute via a GPO? If not, can
anyone suggest a good solution for this? Thank you.

bb


Lanwench [MVP - Exchange]

unread,
Feb 6, 2008, 10:35:10 PM2/6/08
to

Here's a simple way - set up a computer shutdown script containing the
following:

-----------------------------------------------

FOR /F %%A IN ('DIR/B "C:\Documents and Settings"') DO DEL/S/F/Q
"C:\Documents and Settings\%%A\Local Settings\Temporary Internet Files\*.*"
FOR /F %%A IN ('DIR/B "C:\Documents and Settings"') DO RD/S/Q "C:\Documents
and Settings\%%A\Local Settings\Temporary Internet Files\"


Barkley Bees

unread,
Feb 7, 2008, 12:37:24 AM2/7/08
to
Thanks for your reply Lawrence. I have since been told by our management
that our focus will only be on Outlook 2003 (not IE temp files). So we will
need to delete only the files in:

"C:\Documents and Settings\user\Local Settings\Temporary Internet
Files\OLK*"

The question becomes, how do you determine the OLK* folder name of any given
client (to delete is contents) since they appear to be randomly named?


"Lanwench [MVP - Exchange]"
<lanw...@heybuddy.donotsendme.unsolicitedmailatyahoo.com> wrote in message
news:eCkHKqTa...@TK2MSFTNGP05.phx.gbl...

Thanks for your reply Lanwench.


Barkley Bees

unread,
Feb 7, 2008, 1:26:03 AM2/7/08
to
I don't suppose something like this could be added to the shutdown script:

cd %userprofile%\Local Settings\Temporary Internet Files\OLK*
del *.* /s /f /q

"Barkley Bees" <bark...@nomail.com> wrote in message
news:OrrnPuU...@TK2MSFTNGP02.phx.gbl...

Florian Frommherz [MVP]

unread,
Feb 7, 2008, 3:10:57 AM2/7/08
to
Howdie!

Barkley Bees schrieb:


> I don't suppose something like this could be added to the shutdown script:
>
> cd %userprofile%\Local Settings\Temporary Internet Files\OLK*
> del *.* /s /f /q

How about a Group Policy that deletes the "Temporary Internet Files"
upon browser (IE) close?

CLASS USER

CATEGORY "Custom Internet Explorer Settings"

POLICY "Delete Temporary Internet Files on IE close"
KEYNAME "Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache"
VALUENAME "Persistent"
VALUEON NUMERIC 0 VALUEOFF NUMERIC 1
END POLICY
END CATEGORY

cheers,

Florian
--
Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.

Barkley Bees

unread,
Feb 7, 2008, 3:55:50 AM2/7/08
to
Hi Florian. Thanks for your suggesting! But our aim is only to delete
temporary Outlook 2003 files (%userprofile%\Local Settings\Temporary
Internet Files\OLK*) at log off or shutdown, not the IE cache itself.


"Florian Frommherz [MVP]" <flo...@PLEASELEAVETHISOUT.frickelsoft.net> wrote
in message news:%23NJqFEW...@TK2MSFTNGP02.phx.gbl...

Florian Frommherz [MVP]

unread,
Feb 7, 2008, 4:05:30 AM2/7/08
to
Howdie!

Barkley Bees schrieb:


> Hi Florian. Thanks for your suggesting! But our aim is only to delete
> temporary Outlook 2003 files (%userprofile%\Local Settings\Temporary
> Internet Files\OLK*) at log off or shutdown, not the IE cache itself.

Ah - okay. In your initial posting, you mentioned IE as well. Then
you'll have to stick with scripting.

Lanwench [MVP - Exchange]

unread,
Feb 7, 2008, 11:24:28 AM2/7/08
to
Barkley Bees <bark...@nomail.com> wrote:
> Thanks for your reply Lawrence. I have since been told by our
> management that our focus will only be on Outlook 2003 (not IE temp
> files). So we will need to delete only the files in:
>
> "C:\Documents and Settings\user\Local Settings\Temporary Internet
> Files\OLK*"
>
> The question becomes, how do you determine the OLK* folder name of
> any given client (to delete is contents) since they appear to be
> randomly named?

I don't know, but since temp file folders fill up with gunk rapidly, and
these folders are *not* entirely purged within IE when you choose the option
to delete them, why not just do the easy and efficient thing and purge them
all with the command line/batch file stuff? I do this at all my client
offices.

0 new messages