Solved

Setting a logon.bat to change My Documents Target

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

735 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