Question : How to redirect My Documents from a command line or through a script (no AD)

I need to redirect the My Documents folder to a network share using a command line or a script that can be run from a batchfile.

I have a workgroup with a samba file server and home directories. I have several Win2k & XP boxes that I need to redirect the My Docs to the home diretory on the samba share.

net use x: \\server\share\%username% works fine to map a drive to the share as long as they log on to the computer locally with a matching username/pass combination. So the networking and file permissions are all working fine.

For the life of me I cannot find a command line to map the My Docs (or the desktop for that matter) to a share. I have found many registry keys to do it and I know it is a sinch to do it with AD and a GPO. But I need a command line or a script that can be run from a batch file that I can put in a netlogon folder on the samba server and call from a logon script.

I know I am talking about samba here, but the redirection of My Docs should not matter either way, it should work on either MS or Samba.

I will ask this same question in the linux area if you think that is where it belongs.

I have gotten some really great answers out of this site for the last few years, I hope you can come through for me on this one.
Thanks!

Answer : How to redirect My Documents from a command line or through a script (no AD)

Here is a script that will accomplish what you are looking to do:

http://www.microsoft.com/windowsxp/using/networking/learnmore/honeycutt.mspx

I would try it on one test machine first, if everything goes well then you can put it into production. As always make sure you have a recent good backup. HTH :)
Random Solutions  
 
programming4us programming4us