Solved

Setting a logon.bat to change My Documents Target

Posted on 2008-06-26
5
1,475 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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 …

856 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