Temporary Internet Files/Profile issues on Server 2008 Terminal Server


  • Good afternoon all,

    This is mhy first post here as I'm at my wits end with an issue that I have on a customers server.

    They had a peice of malware hit the server (Some fake AV) which was all removed and no trace of this or any other virus/malware are left.  Now the issue that has come up is that when any user logs on every other time the temp internet files folder is not created in %temp% and so the folder redirect in %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files gets access denied.  This then causes Word/Outlook (using word as editor) to bring up the following error:

    Word could not create the work file.  Check the temp environment variable.

    Can anyone shed any light on why this would be?  Obviously I could change the location of this within the registry via a script or gpo but I'm not sure if this will fix the issue or not?



    Thursday, March 21, 2013 3:39 PM


All replies

  • "Word could not create the work file.  Check the temp environment variable." I've read is caused by a problem with the Windows temp folder and occurs because the temporary internet files location for IE is set to be an unexpected location. Specifically, the temporary internet files location for IE is set to be a location in which the user does not have permissions to create new temporary files (obviously, from the "access denied" msg you see).

    This has worked for me. *Make sure all office software is shut down prior to following the below steps* 
    -Click Start.
    - Type in %TEMP% into the text field.
    -Select files/folders in the temp folder (CTRL + A) and hold the SHIFT key then click DELETE. It will then prompt you with a warning to permanently delete these files. Click yes to confirm this.
    - relaunch Word

    Please let me know if this helps. If not, we'll keep at it. :D

    Thursday, March 21, 2013 8:21 PM
  • One thing you can try as well is removing the user profiles created on the server.  There's two steps.

    1. Delete user folders in c:\users

    2. Regedit and navigate to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList and delete the keys for the users.  They usually look like S-1-5-21-111231231231 and inside have a string of ProfileImagePath with a path of c:\Users\username.

    Removing the users from these two locations will make the server think they are logging in again for the first time and rebuild their profiles.  Works in our district when we encounter corrupt profiles.

    Thursday, March 21, 2013 9:56 PM
  • Hi,

    "Word could not create the work file. Check the temp environment variable".

    This error may be caused by the Temporary Internet Files folder for Windows Internet Explorer is set to be in a location where you do not have permission to create new temporary files.

    To solve this issue, use one of the following methods:

    Method 1 Change the location for the Temporary Internet Files folder for Internet Explorer. To do this, follow these steps:
    1. In Internet Explorer, click Internet Options on the Tools menu.
    2. In the Internet Options dialog box, click the General tab.
    3. In the Browsing history section, click Settings.
    4. In the Temporary Internet Files and History Settings dialog box, click Move Folder.
    5. In the Browse for Folder dialog box, select the following location: <Drive:>\Users\<user name>\AppData\Local\Microsoft\Windows\Temporary Internet Files.
      Note AppData is a hidden folder. To show hidden files and folders, visit the following website: Show hidden files
    6. Click OK to close the open dialog boxes.
    7. Restart the computer.
    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

    322756 How to back up and restore the registry in Windows

    Method 2 Point the Cache registry entry to the Temporary Internet Files folder. To do this, follow these steps:
    1. Click Start, and then click Run.
    2. Type regedit in the Open box, and then click OK.
    3. Locate and then click the following registry subkey:
      HKEY_CURRENT_USER \Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
    4. Double-click the Cache registry entry, type the following in the Value data box, and then click OK: %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files
    5. Close Registry Editor.

    Hope this helps!



    Vivian Wang
    TechNet Community Support

    Friday, March 22, 2013 7:27 AM
  • Hi,

    Thanks for all these:

    avandelay05: Hadn't tried this, but again this didn't work.

    RyReb: Not quite so easy on a Terminal server with many users and them using it all the time, however I had already tried this with a couple of users and still get the issues.

    Vivian_Wang: Tried both of these first and did not work.  I then thought it was a plug in within Word causing this but it wasn't.

    I ran through latest updates last night and installed IE10.  But still have the same issue.

    Thanks for your help!


    Edit: After further investigation it looks like this location: %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files is there but get access denied to content.word and content.mso folders when the error comes up.  Seems like every other time I log in the permissions change to these folders...

    • Edited by robstacey Friday, March 22, 2013 9:43 AM
    Friday, March 22, 2013 8:40 AM
  • I'm mentioning this since none of the suggestions have worked so far. There are two locations that need editing under the registry.

    Make sure the ‘cache’ folder on both, are the same (%USERPROFILE%\AppData\Local\Microsoft\Windows\Termporary Internet Files)

    HKEY_CURRENT_USER >Software >Microsoft >Windows >CurrentVersion >Explorer >Shell Folders
    HKEY_CURRENT_USER >Software >Microsoft >Windows >CurrentVersion >Explorer >User Shell Folders

    Also, did you perform the methods on both versions of IE (32 and 64)? Any other browsers should point in the similar direction as well.

    Friday, March 22, 2013 4:30 PM
  • Hi,

    Thanks for your response.

    If you open IE and then open Word, please make sure if it has the same error?

    Please also have a look at the similar thread:

    Mandatory Profile and Temp Internet Files on Server 2008R2

    Hope this helps!


    Vivian Wang
    TechNet Community Support

    Monday, March 25, 2013 6:45 AM
  • Hello,

    if all mentioned informations didn't help please ask this in

    Best regards

    Meinolf Weber
    Microsoft MVP - Directory Services
    My Blog:

    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

    Monday, March 25, 2013 7:39 AM
  • Hi All,

    avandelay05: I did do this, thanks for the suggestion!

    Vivian: Not the same issue as the Temp folder is created, the user just doesn't have permission to content.word within this.

    Meinolf:  Thanks I will do.



    Monday, March 25, 2013 12:46 PM