Learn how to a build a cloud-first strategyRegister Now


Outlook 2010 SecureTemp Files Folder.  Causing Outlook 2010 to crash.

Posted on 2011-02-17
Medium Priority
Last Modified: 2012-05-11
Have a user that when she gets attachment PDF, Word, or Excel docs open them directly from Outlook without saving first.  I have asked the user to save first but they are a high level executive and don't find it neccessary to save.

So, basically when they open these files it puts a temp file in the secure temp files folder, the folder seems to be overfilling or reaching some sort of limit causing Outlook to crash and the document not to open.

Can anyone assist?

thank you
Question by:LumbergsLackey
LVL 59

Expert Comment

by:Chris Bottomley
ID: 34920921
You could look to emptying the temp folder:


Gives an idea, I haven't used this product but I do use the outlooktools from here and commend it highly


Accepted Solution

Vanguard_LH earned 2000 total points
ID: 34921488
As you noted, opening an attachment from an e-mail creates a copy in the Outlook secure temp folder (which is under IE's temp folder).  This is because the attachment is an encoded long text string that has to be decoded and read from somewhere by the viewing app.  First saving the file takes care of the step of decoding and saving to read from a file.  The problem is users will close Outlook while they are still viewing the temp file.  

After extracting the attachment and then viewing with another program, closing Outlook means it cannot delete the temp file.  Another process has a handle on the temp file so Outlook has to close while leaving the temp file behind.  Closing that other app releases the file handle but then it's too late for cleanup because Outlook isn't around anymore.  If the temp file were closed while Outlook was still open and then later Outlook was closed then Outlook could do the cleanup since there would be no open handle on the temp file.

If this upper mgmt type leaves Outlook running (just minimize it to a tray icon) while viewing and *closing* the attachments in some other viewing app then Outlook would clean out its secure temp folder when Outlook exits.  It's a sequence error by the user; i.e., closing Outlook while the temp file is still being viewed.  I don't know why it seems there is a maximum capacity to Outlook's secure temp folder.  Perhaps it is because it is a subfolder under the web browser's TIF folder and a max size is specified for this file cache in the configuration of the web browser.

Neither configuring or manually running the TIF cleanup function (Internet Options -> General tab -> Browsing History: Delete) or using the Disk Cleanup wizard (cleanmgr.exe) will empty out the TIF subfolder for Outlook's secure temp folder.  I use CCleaner from Piriform to do file cleanup.  It also does registry cleanup but this might not be a function you want some mgmt type to perform who doesn't understand why the Outlook secure temp folder doesn't get cleared out.  Once installed on this user's host, you could add a scheduled event in Task Scheduler that runs:

"C:\Program Files\CCleaner\CCleaner.exe" /auto

The double quotes are needed for parsing due to Microsoft's choice to include a space character in the programs folder.  I have it scheduled to run in the wee hours of the morning but any off-hours time for this mgmt type would do.  Besides running the scheduled cleanup at some non-use time, and by defining multiple events for the scheduled event, you could also have this job run when the user logs into their Windows account.  I recommend doing the login cleanup schedule ONLY if this is a restricted or limited user that is not allowed to install software.  There are still some old programs that rely on dumping files in a temp folder and require a reboot where these temp files are used after the reboot and re-login to complete the software installation.

In case this user is continually loading Outlook, opening attachments (without a file save), and then leaving the temp file open when exiting Outlook (i.e., they're cycling Outlook a lot during the day) then you might want to put a shortcut to the above CCleaner command in a toolbar (e.g., Quicklaunch or another custom one) in the Windows taskbar.  Then when they hit this problem again, they can just click on the toolbar button to do the cleanup.  That might help reduce the number of support calls you get from this mgmt type.

You might want to push this mgmt type to do the file save to then open that copy rather than use the temp copy from Outlook's secure temp folder.  Why?  Because if this user ever attempts to edit that attachment, they are actually editing the temp copy.  They won't have the modified file after they exit the editor app (unless they know where to drill down from peeking in the registry to get into Outlook's OLKxxx secure temp folder - which is hidden in Windows Explorer even if it is configured to show hidden files as "special" folders still get excluded in the view).  Editing an attachment is often a prelude to forwarding the modified copy to someone else.  Well, the user opens the attachment, a temp copy gets created and opened, the user edits what they see, they close the editor, and then forward the e-mail with attachment; however, they are forwarding the long encoded text string in the e-mail which hasn't been changed and not the modified temp file.  So the time they spent editing the attachment was wasted as they end up sending the original content in the forwarded e-mail.  The user may only be viewing files for now but if he ever might edit them before forwarding them then he will end up losing his edits.

Author Closing Comment

ID: 34953223
Well, knowing this Exec, or for that matter any Execs here will never do anything that requires them to deviate from their daily routine we'll just have to keep an eye on the folder manuall.

thanks for the information

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

810 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