Script to change My Documents Target location for all users

jmoody
jmoody used Ask the Experts™
on
We are using SCCM to image computers so I am looking for a way to put a script into the task sequence to change the Target location of the My Documents folder for all users that log into the computer. If possible it would be nice to have it point to the users Home folder that is set in Active Directory but if not a drive letter would be acceptable.

Another team created the original image so they set the Target location to a drive letter that we don't use in our agency. I know that a much better way to go about this would be through Group Policy but because of office politics that is not possible. Any help would be much appreciated. All of my clients are Windows XP.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2011
Commented:
You can manually redirect them in the registry, under .....
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

If it is all the same server, just different shares?

Domrthing like this?

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal /d \\Server\share\%USERNAME%" /f

Same for My Music/My Videos/My Pictures

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /d \\Server\share\%USERNAME%" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Videos" /d \\Server\share\%USERNAME%" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /d \\Server\share\%USERNAME%" /f

Same values under "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"......

Author

Commented:
Thanks for example.
Would this affect all users that log into the computer?
The shares are on different servers so would something like %Homeshare%%Homepath% work? From the Run command it takes me to my Home folder.
Most Valuable Expert 2011
Top Expert 2011

Commented:
If all those values are setup in thier AD profiles, then yes.....

Author

Commented:
Thanks for the help. It is working just had to make a few changes to the syntax. it was putting the /f at the end and wasn't mapping correctly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial