• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1397
  • Last Modified:

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

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
1 Solution
Chris BottomleySoftware Quality Lead EngineerCommented:
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

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.
LumbergsLackeyAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now