TS User profiles location/moving

From: Hork (anonymous_at_discussions.microsoft.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 11:56:25 -0800

If your logon script is vbs try testing this:
'***** Move "My Documents" from the profile to
C:\mydocs\USERNAME *****
    oMyDocsReg = WshShell.SpecialFolders("MyDocuments")
    oMyDocsFol = "c:\MyDocs\" &
WshShell.ExpandEnvironmentStrings("%USERNAME%")
    If oMyDocsReg <> oMyDocsFol then
       If not oFSO.FolderExists(oMyDocsFol) then
          If not oFSO.FolderExists("c:\MyDocs") then
             oFSO.CreateFolder("c:\MyDocs")
          End If
          If not oFSO.FolderExists(oMyDocsReg) then
             oFSO.CreateFolder(oMydocsReg)
          End IF
          oFSO.MoveFolder oMyDocsReg, oMydocsFol
       End If
       
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\Current
Version\Explorer\User Shell Folders\Personal",
oMydocsFol, "REG_EXPAND_SZ"
     End If
  End If

Just sub in the new location, currently in the script
it's c:\mydocs. You'll notice the path after RegWrite is
where the My Documents folder location is defined.

>-----Original Message-----
>We have 5 users using MS Office 2003 via TS into a Win2K
box. All of their
>profiles (and therefore my documents) are on the same
drive as the OS
>(c:\documents and settings\user 1)
>
>Is there an easy way to move the location of users "my
documents" folder to
>another drive as they are rapidly filling the drive.
>
>Right clicking on a users desktop my docs icon and
selecting move should
>work ? - is there a more elegant process to relocate the
entire profile?
>
>Thanks.
>
>
>.
>



Relevant Pages

  • RE: Mapped Drives
    ... Use a logon script to delete the current mappings, ... The logon script can be set in the terminal services profile ... > I have about 50 users on a TS, they all have mapped network drives on there ... > The users have two seperate profiles one is there logon profile for there ...
    (microsoft.public.windows.terminal_services)
  • Add Server 2003 and Logon scripts deleted from profiles
    ... I recently added a 2003 Server as my second domain controller. ... Next morning users logged in and the logon script did not run. ... I turned off the 2003 DC, reset all the profiles and it still happens. ...
    (microsoft.public.windows.server.migration)
  • Logon script field deleted after 2003 server added to domain
    ... I recently added a 2003 Server as my second domain controller. ... Next morning users logged in and the logon script did not run. ... I turned off the 2003 DC, reset all the profiles and it still happens. ...
    (microsoft.public.win2000.group_policy)
  • RE: Add Server 2003 and Logon scripts deleted from profiles
    ... Add Server 2003 and Logon scripts deleted from profiles ... >I recently added a 2003 Server as my second domain controller. ... >Next morning users logged in and the logon script did not run. ... >I turned off the 2003 DC, reset all the profiles and it still happens. ...
    (microsoft.public.windows.server.migration)
  • Re: copying files to desktop
    ... I need to add a copy command in a logon script, ... >to copy files from a mapped drive location to the current users desktop. ...
    (microsoft.public.vstudio.general)