Solved

How to delete AppData\Local\Microsoft\Windows\INetCache\IE\ temp files during logoff

Posted on 2015-01-31
4
11,681 Views
Last Modified: 2015-02-09
Hi guys,

I'm trying to get the AppData\Local\Microsoft\Windows\INetCache\IE\ files and folders deleted when an user logoff as the files needs to be deleted afterwards. The user for example download a document from the internet using IE and edit it straight away using libre office, so the file needs to be deleted after the user logoff.

I've tried this as a test:

C:\Users\Administrator>del /q /s C:\Users\%USERNAME%\AppData\Local\Microsoft\Win
dows\INetCache\IE\*.*
Deleted file - C:\Users\administrator\AppData\Local\Microsoft\Windows\INetCache\IE\35LF6500\V5M53G7K.htm
Deleted file - C:\Users\administrator\AppData\Local\Microsoft\Windows\INetCache\IE\HTH6Y87B\snippet[1].htm
Deleted file - C:\Users\administrator\AppData\Local\Microsoft\Windows\INetCache\IE\HTH6Y87B\snippet[2].htm
C:\Users\administrator\AppData\Local\Microsoft\Windows\INetCache\IE\QR5EKELF\TestWordDoc.doc
Access is denied.
Deleted file - C:\Users\administrator\AppData\Local\Microsoft\Windows\INetCache\IE\QR5EKELF\url[2].htm

Open in new window


as you can see it deletes most of the files, but not the document that was downloaded from the internet. This won't work even elevating the cmd to administrator priviledges.

What other ways I could do to clear these files out? I'm looking for perhaps a more elegant solution like a VB script.

Thanks!
0
Comment
Question by:Alex
  • 2
4 Comments
 
LVL 24

Expert Comment

by:NVIT
ID: 40581460
Have you tried this to  delete the cache?
- Run it while user is logged on.
- Be sure to close IE before running it.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Open in new window

0
 
LVL 3

Expert Comment

by:Adam Lewis
ID: 40582325
Have You tried any of these In IE settings?
Tools > Internet Options > General > Browsing History > Delete Browsing History on exit
Tools > Internet Options > General > Settings... > Caches and Databases > Un-check 'Allow website Caches and databases'
Tools > Internet Options > Advanced > Empty Temporary Internet Files when browser is closed
0
 

Accepted Solution

by:
Alex earned 0 total points
ID: 40588829
I ended up creating my own solution by executing a batch script to delete all files. It needed to be a group policy to work for all users
0
 

Author Closing Comment

by:Alex
ID: 40597947
sorted the problem with a batch script
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remote Desktop Session Host Missing on Server 2012 R2 6 17
moving away from .local domain 5 29
Server timing 4 20
Problem to file 4 21
Resolve DNS query failed errors for Exchange
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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