Solved

Setting a logon.bat to change My Documents Target

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remove Installed Application 1 45
Question about Authentication Domain 6 73
Reset Active Directory Password via MS Access 9 55
who removed AD Domain ID 9 26
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
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 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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

895 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

16 Experts available now in Live!

Get 1:1 Help Now