I recently had problems when opening Microsoft Word attachments that were sent through e-mail. When I attempted to open that attachment Word produced a message indicating it can’t create a file and provided a path to a directory. The directory itself was a temporary directory that Word was using to open the attachment.
While the error itself wasn’t hard to temporarily fix, I wanted a more permanent solution. I decided to search me computer to find where this value was stored and change it. I outline how to find and change the value in this post.
Changing the Cache Directory
As mentioned above, I was getting an error when I opened a Word document attachment in an e-mail. The error was:
Can’t create file: C:\Winnt\temp\Temporary Internet Files\Temporary Internet Files. Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder.
The problem was the directory mentioned in the message didn’t exist on my computer. The “C:\Winnt\Temp” folder existed, but the two “Temporary Internet Files” folders didn’t exist.
My first reaction was to check my Internet Explorer settings thinking my cache folder was pointing to the wrong directory. It wasn’t. Internet Explorer was using a directory within my user profile, and not within the system root. My next step was to search the Windows registry for the directory path. That is where I found it and changed it to simply “C:\Winnt\Temp”.
To change the directory, I used the following steps:
- I opened the Windows registry by select “Start Menu->Run”.
- In the “Run” dialog, I typed “regedit” and clicked the “OK” button.
- I navigated to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders key on the left side.
- I then double-click the “Cache” key on the right side, and changed the path.
- I tested the change by opening a Word attachment from an e-mail and the attachment opened without any issue.
I’m not sure what changed the “Cache” key, but since making the change I haven’t had any issues. While a temporary fix of creating the directory structure worked, it was rather annoying to have to do this when I cleaned out the temp directory.