There are a number of descriptions on how to redirect user's "My Documents" folder from the server, but most talk about moving it to another server share eg \\server\user$
I came across an issue the other day where the requirement was to have "My Documents" directed to the users workstation. Now the first thing that comes to mind is using a GPO but unfortunately this did not work because the workstation drive mapping (in this case C: became V
was not available until *after* the policy had been applied. This meant that moving the folder failed.
The solution I came up with was to use a kix script to edit the users registry files as follows:
Maybe not perfect (for example there's no error checking should a user login to Citrix using a different account to the one they logged into on the workstation, plus it's win2k/xp specific, but all those could be solved if required), but it seems to work as it is for this company! Now when users try to save stuff to the desktop or to their "My Documents" it gets dumped onto the local workstation rather than trying to save it on the server. Hopefully this might help some people - when I have the chance I might make this a FAQ so it doesn't get lost! Cheers.
I came across an issue the other day where the requirement was to have "My Documents" directed to the users workstation. Now the first thing that comes to mind is using a GPO but unfortunately this did not work because the workstation drive mapping (in this case C: became V
The solution I came up with was to use a kix script to edit the users registry files as follows:
Code:
; -----------------------------------------------------------------
; Kixtart Version: Kixtart 2001 V4.20
; Developers: beergood
; Company: ninkasi.com
; -----------------------------------------------------------------
BREAK OFF
$Script_version="1.01"
$VarSet = SetTitle("Citrix Config Script - Ver. "+$Script_version)
$VarSet = SetOption("ASCII","ON")
$VarSet = SetOption("DisableDebugging","ON")
$MyDocDrive = "V:" ;// set location of local drive for citrix client //
;****************************************************************************************
;*** Fix location of My Documents etc then exit
;****************************************************************************************
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Desktop", $MyDocDrive+"\Documents and Settings\"+@userid+"\Desktop", "REG_EXPAND_SZ");// Set Desktop location to local drive //
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Desktop", $MyDocDrive+"\Documents and Settings\"+@userid+"\Desktop", "REG_SZ");
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Personal", $MyDocDrive+"\Documents and Settings\"+@userid+"\My Documents", "REG_EXPAND_SZ");// Set My Documents location to local drive //
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Personal", $MyDocDrive+"\Documents and Settings\"+@userid+"\My Documents", "REG_SZ");
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Pictures", $MyDocDrive+"\Documents and Settings\"+@userid+"\My Documents\My Pictures", "REG_EXPAND_SZ");// Set My Pictures location to local drive //
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "My Pictures", $MyDocDrive+"\Documents and Settings\"+@userid+"\My Documents\My Pictures", "REG_SZ");
exit
EndIf
Maybe not perfect (for example there's no error checking should a user login to Citrix using a different account to the one they logged into on the workstation, plus it's win2k/xp specific, but all those could be solved if required), but it seems to work as it is for this company! Now when users try to save stuff to the desktop or to their "My Documents" it gets dumped onto the local workstation rather than trying to save it on the server. Hopefully this might help some people - when I have the chance I might make this a FAQ so it doesn't get lost! Cheers.