Link to home
Start Free TrialLog in
Avatar of bobrossi56
bobrossi56

asked on

Windows Server 2008 R2 LOGON.BAT location

I have a new server running Windows 2008 R2. I create a LOGON.BAT file that looks like this:

if %USERNAME%==tmulroy net use O: \\DC1\OWNER
if %USERNAME%==tmulroy net use M: \\DC1\MANAGER
if %USERNAME%==smulroy net use O: \\DC1\OWNER
if %USERNAME%==smulroy net use M: \\DC1\MANAGER
if %USERNAME%==ccasillo net use M: \\DC1\MANAGER

I have placed this file in:
C:\Windows\sysvol\sysvol\mfd.com\scripts\LOGON.BAT

I have created the MANAGER and OWNER folder and shared it out to the above account names with full access.

In the above account profiles in AD, I have added LOGON.BAT to the logon script field.

When I log in using any of the 3 above accounts the M and O drives never get mapped.

HELP....thx experts, BobR
ASKER CERTIFIED SOLUTION
Avatar of Govvy
Govvy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stressedoutadmin
stressedoutadmin

And make sure that you are running notepad as Administrator (right click - run as) so you can save back to that directory!!
Avatar of bobrossi56

ASKER

What is the path to NETLOGON folder, I don't see it under C:\Windows
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
do you see the script run during logon?  you may want to put a pause command in the bat file to give you time to see what's going on.  also have you tried mapping the drives at the client station with net use to see if it works?
The scripts folder was not shared out as NETLOGON, I did that and now it works fine. Thx all