Announcement

Collapse
No announcement yet.

Redirect Favorites to Home Folder or Server Share

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect Favorites to Home Folder or Server Share

    Does anyone know how to redirect Internet Favorites to a share on the server or a users Home Dricvtory using GPO. I am able to to acheive this by editing the following reg key hkcu\software\microsoft\winodws\currentversion\exp lorer\user shell folders\favortive on each client machine but i would like to either use a polciy for the redirct or be able to edit the reg key with a script and use a gpo to push the script.

  • #2
    Re: Redirect Favorites to Home Folder or Server Share

    Sounds like a good method. A logon script under the User Configuration in a GPO should do.

    Do you have any questions about it?... 'cause it sounds like you already know what to do.
    Regards,
    Jeremy

    Network Consultant/Engineer
    Baltimore - Washington area and beyond
    www.gma-cpa.com

    Comment


    • #3
      Re: Redirect Favorites to Home Folder or Server Share

      Do you know how to write the script to edit the reg key?

      Comment


      • #4
        Re: Redirect Favorites to Home Folder or Server Share

        I must warn you that I'm pretty weak in the scripting area but I think this will do what you want it to do.
        Code:
        reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v Favorites /t REG_EXPAND_SZ /d "\\servername\share" /f
        EDIT - I should mention that you need XP or newer to use the reg add command.
        Last edited by JeremyW; 9th November 2006, 23:01.
        Regards,
        Jeremy

        Network Consultant/Engineer
        Baltimore - Washington area and beyond
        www.gma-cpa.com

        Comment


        • #5
          Re: Redirect Favorites to Home Folder or Server Share

          I'll post a VBS script example on your new thread.

          As an alternative to VBS, you can run something like "regedit /s favorites.reg" from a CMD or BAT file.

          In my "favorites.reg", I set the value in "User Shell Folders" and "Shell Folders" as follows:

          I mention the "Shell Folders" bit in case you see any strange behavior when modifying only the "User Shell Folders" value.

          Windows Registry Editor Version 5.00

          [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Shell Folders]
          "Favorites"="%HOMEDRIVE%%HOMEPATH%Favorites"

          [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\User Shell Folders]
          "Favorites"=hex(2):25,00,48,00,4f,00,4d,00,45,00,4 4,00,52,00,49,00,56,00,45,00,\
          25,00,25,00,48,00,4f,00,4d,00,45,00,50,00,41,00,54 ,00,48,00,25,00,46,00,61,\
          00,76,00,6f,00,72,00,69,00,74,00,65,00,73,00,00,00
          On my systems, each user's "User profile" has "Home folder" set to a "Local path" of "H:\"

          Can't recall exactly why I needed to set the value in "Shell Folders" too but it has worked for years so I haven't questioned it. Maybe it's because I use environment variables? The environment variables do resolve in "Shell Folders" after reboot so "%HOMEDRIVE%%HOMEPATH%Favorites" turns into "H:\Favorites". They stay unresolved in "User Shell Folders"
          Cheers,

          Rick

          ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

          2006-2099 R Valstar. This post is offered "as is" for discussion purposes only with no express or implied warranty of any kind including, but not limited to, correctness or fitness for use. Nothing herein shall be construed as advice. Attempting any activity based on information in this post is done at your own risk.

          Comment


          • #6
            Re: Redirect Favorites to Home Folder or Server Share

            Thank you both for your reply to my thread. Jeremy unfortuanlty i was not able to get your script to work. In my fustration with this issue i posted again on the scripting scripting section. I do apologize for not responding back to jeremy. I do appreciate both response to my inquiry.

            Comment


            • #7
              Re: Redirect Favorites to Home Folder or Server Share

              download this

              http://yizhar.mvps.org/files/NUTS.EXE

              and use the program regadm that comes with this. basically it will transform a reg file into an adm file. you can then use that as an administrative template and push this setting out though gpo.
              MCSE 2000\2003, A+
              00000001-00000011-00000011-00000111

              Comment


              • #8
                Re: Redirect Favorites to Home Folder or Server Share

                Well, this is GPO forum, so GPO to the rescue...

                Here is the administrative template to use (also attached as text file):
                Code:
                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 
                
                     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"
                After you add the custom administrative template and in the GPO editor uncheck:
                View->Filtering->Only show policy settings that can be fully managed, you will find the settings you are interested in at the location shown in the picture.

                Have just written it and gave it a very quick test and it worked for me, so if you're going to deploy in production, please test, test, test !!!
                Attached Files
                Guy Teverovsky
                "Smith & Wesson - the original point and click interface"

                Comment


                • #9
                  Re: Redirect Favorites to Home Folder or Server Share

                  Does anyone know how to redirect Internet Favorites to a share on the server or a users Home Directory using GPO. I am able to to achieve this by editing the following reg key hkcu\software\microsoft\winodws\currentversion\exp lorer\user shell folders\favorite on each client machine but I would like to either use a policy for the redirect or be able to edit the reg key with a script and use a gpo to push the script.
                  Hi!!
                  If you still need solution, here is it.
                  It works in my test environment...
                  The example below redirects both locations to "\\London\Home\%username%" however as the first one is in hex if you are using a different location, then you will need to make the change in your own registry so that the export will be correct.
                  1. Create the registry file "favorites.reg"
                  Open notepad and add following:

                  Code:
                  Windows Registry Editor Version 5.00
                  
                  [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
                  
                  "Favorites"=hex(2):25,00,48,00,4f,00,4d,00,45,00,44,00,52,00,49,00,56,00,45,00,\
                  25,00,5c,00,46,00,61,00,76,00,6f,00,72,00,69,00,74,00,65,00,73,00,00,00
                  
                  [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
                  
                  "Favorites"="\\London\Home\%username%"
                  Note: In this example I redirect favorites folder for each user to him own Home directory that was created previously at \\London\Home folder.
                  You can change this value according to you environment...

                  2. Create the redirect.bat file (or give another name...) and place this line in it:

                  %systemroot%\regedit /s favorites.reg

                  3. Now, you should configure group policy for this logon script.

                  To do this open GPO editor, create new GPO object. went to User configuration > Windows settings > Scripts (Logon/Logoff)
                  Right click on Logon script > Properties and you should receive window like in a picture bellow:


                  Now click on "Show files" button and copy/paste favorites.reg and favorites.bat into the opened window. Close this window and click on "Add" button:



                  Click on "Browse" button and chose favorites.bat.

                  Note: Make sure that both favorites.reg and favorites.bat in same directory, otherwise redirection will not work!!!
                  Don't forget link this GPO to appropriate OU...

                  Now you can close all opened windows.
                  Open command prompt on you Server where you create this policy and do gpupdate /force command for ensure that policy you created is applied.
                  Hope it help.
                  Last edited by igor7; 19th February 2007, 23:44.

                  Comment

                  Working...
                  X