I have also changed the value of the "My Documents" folder.

If a user clicks on the "My Documents" icon on the desktop, they are directed to the directory I create for them in thier Home drive. The Home drive is mapped to a hidden share for each user. The H: drive is mapped to "\@USERID"+"$" elsewhere in the script.

With Office 97, this was very easy to do in KiXtart. In fact, it's how I did it before migrating to Office 2000.

Here is the KiXtart code I used for Office 97.

code:

; Set Office 97 "policies" via this script.

$UserDrive = "H" ; Mapped drive for the User Directory
$ProjectDrive = "P" ; Mapped drive for the Shared Project Directory
$OfficeFiles = "Personal Documents" ; Directory for Users Personal Office Documents
$OfficeTemplates = "Templates" ; Directory for Users Personal Office Templates
$OutlookFiles = "Outlook" ; Directory for Users Outlook Files
$SharedOfficeFiles = "Shared Documents" ; Directory for Users Shared Office Documents
$SharedOfficeTemplates = "Templates" ; Directory for Users Shared Office Templates


; Set the user's home directory to their share on the Home Server.
IF %OS% = "Windows_NT"
SET "HOMEDRIVE=" + $UserDrive + ":"
? " HOMEDRIVE set to " + $UserDrive + ":"
ENDIF


; Create the "Personal Documents" folder if it does not exist.
? ? "Creating the " + $OfficeFiles + " directory:" ? " "
IF DIR ($UserDrive + ":\" + $OfficeFiles) = $OfficeFiles
"Directory already exists - " + $UserDrive + ":\" + $OfficeFiles
ELSE
MD $UserDrive + ":\" + $OfficeFiles
IF @ERROR = 0
"Directory has been created successfully - " + $UserDrive + ":\" + $OfficeFiles
ELSE
"Error creating directory - " + $UserDrive + ":\" + $OfficeFiles
ENDIF
ENDIF

; Create the "Templates" folder if it does not exist.
? ? "Creating the " + $OfficeTemplates + " directory:" ? " "
IF DIR ($UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates) = $OfficeTemplates
"Directory already exists - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates
ELSE
MD $UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates
IF @ERROR = 0
"Directory has been created successfully - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates
ELSE
"Error creating directory - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates
ENDIF
ENDIF

; Create the "Outlook" folder if it does not exist.
? ? "Creating the " + $OutlookFiles + " directory:" ? " "
IF DIR ($UserDrive + ":\" + $OfficeFiles + "\" + $OutlookFiles) = $OutlookFiles
"Directory already exists - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OutlookFiles
ELSE
MD $UserDrive + ":\" + $OfficeFiles + "\" + $OutlookFiles
IF @ERROR = 0
"Directory has been created successfully - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OutlookFiles
ELSE
"Error creating directory - " + $UserDrive + ":\" + $OfficeFiles + "\" + $OutlookFiles
ENDIF
ENDIF

; Path to the Personal Folder used by all Office Apps.
? ? "Set the path of the Personal folder used by all Office 97 apps." ? " "
IF WRITEVALUE ("Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Personal", $UserDrive + ":\" + $OfficeFiles, "REG_EXPAND_SZ") = 0
"Value written to the registry - Personal"
ELSE
"Error writing value to the registry - Personal"
ENDIF
IF DELVALUE ("Software\Microsoft\Office\8.0\Excel\Microsoft Excel", "DefaultPath") = 0
? " Value deleted from the registry - DefaultPath"
ENDIF
IF DELVALUE ("Software\Microsoft\Office\8.0\Access\Settings", "Default Database Directory") = 0
? " Value deleted from the registry - Default Database Directory"
ENDIF
IF DELVALUE ("Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default", "") = 0
? " Value deleted from the registry - Recent Folder List\Default"
ENDIF
IF DELVALUE ("Software\Microsoft\Office\8.0\Binder", "DefaultDirectory") = 0
? " Value deleted from the registry - DefaultDirectory"
ENDIF
IF DELVALUE ("Software\Microsoft\Office\8.0\Word\Options", "DOC-PATH") = 0
? " Value deleted from the registry - DOC-PATH"
ENDIF

; Path to the User Templates Folder used by all Office 97 Apps. ;
? ? "Set the path of the User Templates folder used by all Office 97 apps."
IF WRITEVALUE ("Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates", "", $UserDrive + ":\" + $OfficeFiles + "\" + $OfficeTemplates, "REG_SZ") = 0
? " Value written to the registry - LocalTemplates"
ENDIF

; Path to the Workgroup Templates Folder used by all Office 97 Apps. ;
? ? "Set the path of the Workgroup Templates folder used by all Office 97 apps."
IF ADDKEY("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplates") = 0
? " Key added to the registry - SharedTemplates"
ENDIF
IF ADDKEY("HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\TemplateDir") = 0
? " Key added to the registry - TemplateDir"
ENDIF
IF WRITEVALUE ("Software\Microsoft\Office\8.0\Common\FileNew\SharedTemplates", "", $ProjectDrive + ":\" + $SharedOfficeFiles + "\" + $SharedOfficeTemplates, "REG_SZ") = 0
? " Value written to the registry - SharedTemplates"
ENDIF
IF WRITEVALUE ("Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\TemplateDir", "", $ProjectDrive + ":\" + $SharedOfficeFiles + "\" + $SharedOfficeTemplates, "REG_SZ") = 0
? " Value written to the registry - TemplateDir"
ENDIF


Now, if your using Office 2000, there is a problem. MS moved the location of these registry keys into the Policies of the HKCU and gave Everyone read only permissions. Administrators and System have full control. I wrote a script for all of the new keys, but it won't do your useres any good if they don't have the correct permissions to modify the keys.

My solution was to use a good old fashioned Policy. I took the new .POL files for Office 2000 and modified them so that they are backwards compatible with the NT 4.0 policy editor. Due to management policies beyond my control, we are not able to go to an active directory structure and are forced to remain in an NT 4.0 domain model. Otherwise, I would just be using the Group Policies in the Active Directory.

If you would like a copy of those .POL files, let me know and I can email them to you.