Link to home
Start Free TrialLog in
Avatar of GibbsSupport
GibbsSupport

asked on

DFS Share & Windows Login Script

Background information


We have two sites, SITE A and SITE B. I have a fully functioning DFS Share with replicated folders in each site. This is working wonderfully.
Each site is running a Windows 2003 R2 x64 Domain Controller and a separate Windows 2003 R2 X64 File server.

I have created a Name space for my share and published the replicated folders.

Now that I have this share published, Id like to use it in the login script instead of the server names. This way the users are using DFS and not the directly the server in each location. So that if a user travels between sites, they can get the files quickly by accessing them locally.

Here is our current Login Script.

@ECHO OFF
If "%OS%" == "Windows_NT" goto WINNT
GOTO OUT

:WINNT
NET TIME \\ORL-DC01 /SET /YES
NET USE N: \\orl-file01\public /PERSISTENT:NO

GOTO OUT

:OUT

This login script is the one we have been using for years.
 
I want to change it to
@ECHO OFF
If "%OS%" == "Windows_NT" goto WINNT
GOTO OUT

:WINNT
NET TIME \\ORL-DC01 /SET /YES
NET USE N: \\corp.mycompany.com\Company\Files\Public Files\Public /PERSISTENT:NO

GOTO OUT

:OUT

Now when I do this I get an error in the script.
C:\>test.bat
Current time at \\ORL-DC01 is 2/17/2009 8:32 AM

The command completed successfully. (Net time)

System error 86 has occurred.

The specified network password is not correct. (The DFS Share)


Now I did some testing and can browse to this exact path \\corp.mycompany.com\Company\Files\Public Files\Public without any issues what so ever. I can even it add it into my Active Directory Users and Computers Home Folder  and that maps ok.

Further testing lets me use this script
@ECHO OFF
If "%OS%" == "Windows_NT" goto WINNT
GOTO OUT

:WINNT
NET TIME \\ORL-DC01 /SET /YES
NET USE N: \\corp.mycompany.com\Company  /PERSISTENT:NO

GOTO OUT

:OUT

However I do not want to give my user access to the Root of the share.

Any help would be appreciated.

Thank you

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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 GibbsSupport
GibbsSupport

ASKER

Thanks! scripting was never my thing.