locked
Redirect Internet Temp Files - Group Policy RRS feed

  • Question


  • Hi There,

    I am wondering is there a way to redirect users internet temp files/folder via Group Policy.  Currently everyone is saving their temp files to the c:\documents and settings folder.  Of course this gets copied back to the server when they logoff.  I would like to redirect them all to c:\temp.  But too many users, so doing it by Group Policy would be the best way.

    Can this be done ?  I look at the current policies and there is no option for that.

    Ben
    Monday, March 17, 2008 8:20 PM

Answers

  • Hi,

     

    There seems no existing Group Policy setting available for redirect the Temporary Internet Files folder. By default this folder is located in the Documents and Setting\username\Local Setting. For the Local Setting folder holds non-critical settings and data that is too large, all sub folders in Local Setting can't be redirected even doesn't follow in roaming profiles.

     

    The Temporary Internet Files location is registered in the several keys under HKCU. To achieve this goal, we can manually modify these key to redirect the Temporary folder to the new place.

     

    Note: Please understand that this is not an official method, although it worked on my test machines. Therefore, please perform full backup and test the method in your lab environment first.

     

    1.    Create *.adm file with the following setting:

    ------------------------------------------------------------------------------------

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    CLASS USER ;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Cache"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Directory"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Cache"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    [strings]

    IECache="IE Temporary Internet Files"

    CustomCache1="Internet Explorer Temporary Internet Files(user)"

    CustomCache2="Customize Temporary Directory"

    CustomCache3="Enter Path for the new Temporary Directory"

    ------------------------------------------------------------------------------------

     

    2.    Add this adm files to Administrative Templates

    -      Right click Administrative Templates node--->Add\Remove Templates

    -      Right click 'Internet Explorer Temporary Internet Files(user)' node--->View--->Filtering…--->un-choose 'Only show policy settings that can be fully managed'

     

    3.    For user-specific setting, enable all settings with same value in 'Internet Explorer Temporary Internet Files(user)' node.

     

    Hope it helps.

     

    Tuesday, March 18, 2008 10:37 AM

All replies

  • Hi,

     

    There seems no existing Group Policy setting available for redirect the Temporary Internet Files folder. By default this folder is located in the Documents and Setting\username\Local Setting. For the Local Setting folder holds non-critical settings and data that is too large, all sub folders in Local Setting can't be redirected even doesn't follow in roaming profiles.

     

    The Temporary Internet Files location is registered in the several keys under HKCU. To achieve this goal, we can manually modify these key to redirect the Temporary folder to the new place.

     

    Note: Please understand that this is not an official method, although it worked on my test machines. Therefore, please perform full backup and test the method in your lab environment first.

     

    1.    Create *.adm file with the following setting:

    ------------------------------------------------------------------------------------

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    CLASS USER ;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Cache"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Directory"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    CATEGORY !!CustomCache1

    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"

    POLICY !!CustomCache2

    PART !!CustomCache3 EDITTEXT

    VALUENAME "Cache"

    DEFAULT "C:\IECache"

    END PART

    END POLICY

    END CATEGORY

    [strings]

    IECache="IE Temporary Internet Files"

    CustomCache1="Internet Explorer Temporary Internet Files(user)"

    CustomCache2="Customize Temporary Directory"

    CustomCache3="Enter Path for the new Temporary Directory"

    ------------------------------------------------------------------------------------

     

    2.    Add this adm files to Administrative Templates

    -      Right click Administrative Templates node--->Add\Remove Templates

    -      Right click 'Internet Explorer Temporary Internet Files(user)' node--->View--->Filtering…--->un-choose 'Only show policy settings that can be fully managed'

     

    3.    For user-specific setting, enable all settings with same value in 'Internet Explorer Temporary Internet Files(user)' node.

     

    Hope it helps.

     

    Tuesday, March 18, 2008 10:37 AM
  •  Miles Li – MSFT wrote:

    ... all sub folders in Local Setting can't be redirected even doesn't follow in roaming profiles.

     

    In theorie may be, but I have case this huge directory, even temp folder, are transmit to server with a roaming profile...

     

    Anyway thanks for this template

    Wednesday, May 21, 2008 3:00 PM
  • I would approach this in one of two ways.

     

    1) YOu can control which folders are copied back to the server, using Group Policy. This way, you can keep the current location fo the files in tact, for management purposes, and still fix your issues.

    2) YOu can use Group Policy PReferences to remove all of the files in the Temporary  folder, thus nothing is copied back to the server.

    3) Using the other post where the folder is redirected, you can use Group Policy Preferences REgistry policy to do this hack. It will allow you to more easily control the Registry setting and not have to create an ADM file.

     

    Derek

    Group Policy Resource Kit

    Thursday, May 22, 2008 1:38 PM