Solved

Setting a logon.bat to change My Documents Target

Posted on 2008-06-26
5
1,471 Views
Last Modified: 2013-11-05
I've got Windows Server 2003 running as a primary Domain Controller and when it comes to setting up users, i've got a logon.bat that attaches network drives/printers to the target user. As i wish the files stored in My Documents to be located on a remote server via Network Drive, would it be possible to add a line in the logon batch file that automatically changes the client PC's My Documents target folder to a network drive?

Thanks
All help appreciated
0
Comment
Question by:pbninja101
5 Comments
 
LVL 13

Expert Comment

by:TheCapedPlodder
ID: 21876014
I'm not sure if this can be done via batch scripting.

You can definitely do it with a group policy object using the following setting:

User Configuration\Windows Settings\Folder Redirection\My Documents

Cheers,

Plod
0
 
LVL 8

Expert Comment

by:rjwesley
ID: 21876193
User Configuration > Windows Settings > Folder Redirection > Right click My Documents. I alway recommend not to use the default domain policy

I've got mine at Setting Basic - Redirect everyone's folder................
and the Target folder location - set to Redirect to the user's home directory..........

In AD Users and Computers > right click a username > Profile tab > Set the Home folder (\\servername\sharename\username) (using %username% - will create the directory and set permissions automatically), also type in the name of your logon.bat in the User profile > Logon script location and do this for all users.

Rob

0
 
LVL 8

Accepted Solution

by:
rjwesley earned 125 total points
ID: 21876234
One other item:

Your logon.bat file should include the line:
NET USE U: /HOME
U being the same drive letter you chose in the Home folder setting for all users (use the same drive letter for all users).

Rob
0
 
LVL 4

Expert Comment

by:Wiired
ID: 21876249
net use H: /home
0
 
LVL 1

Author Comment

by:pbninja101
ID: 21876328
Thanks Rob, problem sorted.
0

Join & Write a Comment

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now