Jump to content

Folder Redirection Favorites Problem Creating %username% Folder


Recommended Posts

Posted

I have tried pushing the ie favorites through and ADM, and a script. I even manually edited the reg files. But when the user logs in, it creates a folder called %username% instead of the users Name.

 

Here is the expample script I am using. That all works and it does set the variables.

 

Option Explicit

 

Dim RegLocate, objShell

 

Set objShell = WScript.CreateObject("WScript.Shell")

 

RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites"

 

objShell.RegWrite RegLocate,"\\file004\Users\%USERNAME%\Favorites","REG_SZ"

 

RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites"

 

objShell.RegWrite RegLocate,"\\file004\Users\%USERNAME%\Favorites","REG_SZ"

 

 

Thanks for any help

Mike

Posted

Here's an ADM file that we use to redirect a users Favorites folder to a new folder under their My Documents Folder.

 

If works for us....

 

CLASS USER

 

CATEGORY "Student Modifications"

 

POLICY "Mandatory Profile Favorites Location"

 

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

PART "Recommended location is \\server\%username%\My Documents\Favorites" TEXT

END PART

PART "Location of Favorites folder?" EDITTEXT REQUIRED EXPANDABLETEXT

VALUENAME "Favorites"

END PART

END POLICY

END CATEGORY

 

 

Hope this helps

 

Graham

Posted
If the above doesn't work then try and expand the environment variable using the correction function then concatenate that to your string.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...