Redirect Favorites and Cookies folder using a Group Policy

by Daniel Petri - January 12, 2009

Here's a great tip submitted by one of our readers - Ziv Shadar. I've uploaded it almost word for word. Thanks Ziv!

When using roaming profiles we must understand that a lot of file copying is performed when logging on to and logging off from the workstation. For example, a user can have thousands of little cookie files on his or her user profile, and when copies to and from the profile's location to the user's workstation, they can really slow down your logon. That is why it’s good to redirect cookies to the user’s home folder, because it stops lots of files from being copied every time you logon into a new computer.

Favorites are more secure on home folder if you ever need to delete the user profile, and more easy to access, and backup.

Both redirections can be done via GPO using a custom ADM file, which I found on the Internet. When properly used, this GPO tattoos the registry and will not revert back when removed, so if you have to change the settings back, you will need to logon and only then it will revert back.

  1. Copy the following text and paste it into a new file with the .ADM extension. Save this file on the server in the c:\windows\inf folder.
  2. CLASS USER
    
    CATEGORY !!WindowsComponents
    
    CATEGORY !!InternetExplorer
    
    CATEGORY !!IE_Favorites
    
    KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
    
    
    
    POLICY !!IE_Favorites
    
    #if version >= 4
    
    SUPPORTED !!SUPPORTED_IE5
    
    #endif
    
    
    
    EXPLAIN !!IE_Favorites_Location_Explain
    
    
    
    PART !!IE_Favorites_Location_Tip1 TEXT
    
    END PART
    
    
    
    PART !!IE_Favorites_Location EDITTEXT EXPANDABLETEXT
    
    VALUENAME Favorites
    
    DEFAULT %USERPROFILE%\Favorites
    
    ;; MAXLEN 120
    
    REQUIRED
    
    END PART
    
    END POLICY
    
    
    
    POLICY "Redirect Cookies"
    
    PART "Cookies Folder" EDITTEXT REQUIRED EXPANDABLETEXT
    
    DEFAULT "%USERPROFILE%\Cookies"
    
    VALUENAME "Cookies"
    
    END PART
    
    END POLICY
    
    
    
    END CATEGORY ;; IE_Favorites
    
    END CATEGORY ;; Internet Explorer
    
    END CATEGORY ;; WindowsComponents
    
    
    
    [strings]
    
    
    
    WindowsComponents="Windows Components"
    
    IE_Favorites="Location of Internet Explorer Favorites"
    
    IE_Favorites_Location="The path to the favorites folder"
    
    IE_Favorites_Location_Explain="Specify the path to the location of favorites. You can use variables like %USERPROFILE%, %USERNAME%, etc... Both local and UNC path are valid."
    
    IE_Favorites_Location_Tip1="Specify the UNC path to the favorites location"
    
    InternetExplorer="Internet Explorer"
    
    SUPPORTED_IE5="at least Internet Explorer v5.01"
    
    
  3. Open Group Policy Management Console (or GPMC), select the appropriate GPO (or create a new one). Edit the appropriate GPO (right-click on the GPO and select Edit).
  4. Expand the User Configuration part and add the new .ADM template to the Administrative Templates.
  5. Click on Administrative Templates, then click on the View > Filtering menu option.
  6. Remove the checkbox from “Only show policies that can be fully managed”.
  7. Next go to Windows Components > Internet Explorer > Location of Internet Explorer Favorites
  8. Enable the policy and change the path to %HOMESHARE%\Cookies or %HOMESHARE%\Favorites.

Note: If you ever need to change it back to what it used to be then use %USERPROFILE%\Favorites or %USERPROFILE%\Cookies, as needed.

Advertisement



Tip: Notice that now the cookies and favorites won’t stay with you if you are not connected to the network with a laptop for example, you may consider enabling usage of offline files for that folder.

Please note that by using the above tip, the context of Favorites or Cookies will NOT be automatically moved to the new location. You should either manually copy these files to the network location, or use a logon script to do it. Also cookies and favorites will stay on the server side profile and will be copied every time so you won’t benefit from quick logon until you move or delete them, so make sure your script also deletes them from the old place. Use Windows Explorer on the server and delete them. The cookies will be re created as the user uses the Internet.

Links

Recent Windows Server 2008 Forum threads

Got a question? Post it on our Windows Server 2008 forums!

Advertisement



Join The Petri Insider - Weekly IT Tutorial and Tips, Whitepaper and Webinars
  • Pingback: Understanding Windows Server 2008 Server Core

  • Pingback: temp file delete

  • Pingback: Should know but don't how to untangle shared IE8 settings

  • Pingback: Mandatory Profiles and IE Favourites

  • Pingback: Mandatory profiles in XP / Windows 7 environment

  • Pingback: Mandatory Profiles - Internet explorer passwords / usernames save

  • aidanjoc

    I followed the instructions above to redirect cookies folder to user h: and the policy applied correctly folder created etc and cookie files get copied and updated into this location when user logoff alway appear to good. We use Dynamic CRM online version and the presennce of a cookie:%username%@%company instance%.crm5.dynamic.com stops the CRM welcome splash screen from appear everytime CRM is logged onto. The redirected folder does contain this cookie however it lost it formatting when copied so now it’s just 8 digit xxxxxxxx.txt file and the CRM splash screen is still appearing at each logon. Are these cookie files still valid or is IE ignore the redirected location? thanks

  • aidanjoc

    I followed the instructions above to redirect cookies folder to user h: and the policy applied correctly folder created etc and cookie files get copied and updated into this location when user logoff alway appear to good. We use Dynamic CRM online version and the presennce of a cookie:%username%@%company instance%.crm5.dynamic.com stops the CRM welcome splash screen from appear everytime CRM is logged onto. The redirected folder does contain this cookie however it lost it formatting when copied so now it’s just 8 digit xxxxxxxx.txt file and the CRM splash screen is still appearing at each logon. Are these cookie files still valid or is IE ignore the redirected location? thanks