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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

777 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