[Wolves] Setting Windows 2k to use a network disk for data

James Turner james at turnersoft.co.uk
Fri Jan 6 02:26:08 GMT 2006


On Thursday 05 Jan 2006 22:41, Ron Wellsted wrote:
> On Thu, 5 Jan 2006, Mark Ellse wrote:
> > Anyone know how to set up Win2k to use a separate hard drive for all the
> > Documents and Settings contents? Have done a web search and the only
> > thing I can find is how to store on a Windows 2000 server - which I don't
> > want to do.


> 1/ create a directory on the SME server under the user's home
> directory called "My-Documents" (or what ever you want to call it).
>
> 2/ on the Windows system, while logged in as the user, right-click on
> "My Documents", down to "Properties" and left-click.
>
> 3/ Now click on the "Move" button and browse to the SME server, find the
> folder you created in 1 above and click "OK".  Windows should now move all
> the user's documents from the workstation to the server.
>
> 4/ Repeat step 1 for each user on the network.
>
> 5/ Repeat steps 2 & 3 for each user on each workstation. (Ade will bring
> up Group Policies here as this would allows you to do this just once on
> the Windows server)


The location of the My Documents directory is stored in:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer
   \Shell Folders\Personal

and

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer
   \User Shell Folders\Personal

You could add code to the user's login script to change these registry keys to 
point to the new location, the effect being equivalent to Group Policies 
(which basically do the same thing). You can also redirect other locations 
such as the desktop and Start Menu, effectively allowing them to be centrally 
managed.

Example values:

Z:\Documents
H:\home\%username%\my_documents


A few points about "My Documents" that will make you *really* appreciate the 
design quality of UNIX/Linux/GNOME/KDE all the more (even if you previously 
didn't think it was all that great)....

1. If you use Microsoft Office, beware that Word and Access have their own
   seperate registry keys to store the default location for saved documents.
   (Somewhere under HKEY_CURRENT_USER\Software\Microsoft\Office I believe).
   Excel and Publisher use the location from the above registry keys as they
   should.

2. There are various API calls and other methods which programs can use to
   find out the "My Documents" location, all with varying degrees of support
   or obsolescence. Those that I can think of offhand are:

   - HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer
     \Shell Folders\Personal

   - HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer
     \User Shell Folders\Personal

   - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Explorer
     \Shell Folders\Personal

   - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Explorer
     \User Shell Folders\Personal

   - SHGetSpecialFolderPath()

   - SHGetSpecialFolderLocation()

   - SHGetFolderPath()

   The last of these is the current "official" Microsoft-recommended way to
   determine the location. It is only supported on Windows ME/Windows 2000 or
   later, unless Internet Explorer >=4.0 is installed(!)

   At least one more method of finding the "My Documents" location may be due
   for inclusion in Vista/Longhorn. And you wondered why people said Windows
   was bloated?

3. http://blogs.msdn.com/oldnewthing/archive/2003/11/3.aspx

   Don't forget to read the blog comments for more commentry on Microsoft's
   incompetence on what should have been the simplest of features to
   implement.

(rant over... sorry about that... nasty flashback to my Visual FoxPro 
developer days or something)

Regards,

James



More information about the Wolves mailing list