How do I -- preferably at a machine or registry level -- disable storing temporary internet files, either altogether or for a specific service account?


We utilize software that does some web scraping for us 1.

As this software scrapes, it utilizes the WebBrowser control which uses IE (not my preference either.)

As a result, temporary internet files fill up very quickly.

Rather, that We're looking for a way at a machine level (or as a registry setting for that service account's user) to disable those files continuing to exist beyond a browser session.

We'd like to do this without resorting to private mode or something along those lines.

Progress So far:

I found this article which references HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ Internet Settings\Cache and a Persistent DWORD with a value of 0 to keep the cache empty. However, after attempting this in the registry for our service account's SID and for HKLM, it did not appear to have an effect; the temporary internet files still grew.

1 (it's legitimately for our clients, no spammy stuff -- promise!)

  • IE has an "Empty temporary internet files folder when the browser is closed" option. Have you tried enabling that for the user the software runs as? Also, if you have the programs' source code perhaps: How to clear the cache when your application hosts a WebBrowser control in Visual C# .NET – Ƭᴇcʜιᴇ007 Apr 10 '15 at 22:02
  • You might set up a Scheduled Task that deletes all files in the IE cache. A few might be in use at any one time, but if the task fails "gracefully" for locked files, it could resolve the issue. See stackoverflow.com/questions/10334982/…. – DrMoishe Pippik Apr 10 '15 at 22:21
  • @DrMoishePippik thanks for the comment! We're actually looking to specifically avoid this -- we have low resource machines, so the less churn the better. We have a similar process in place, but would much prefer the process to take care of itself as it happens. – SeanKilleen Apr 10 '15 at 22:32
  • @Ƭᴇcʜιᴇ007 thanks for responding! I attempted to do this via the registry for that user's SID but it's possible I either got the wrong reg key or it didn't work. I'll try seeing if "run as" allows me to get to it; that might help me reverse engineer which registry key it is. I have to automate it across many servers so the less "open and click", the better. :) – SeanKilleen Apr 10 '15 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.