Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BAT Login Script to 2003 and NT

Status
Not open for further replies.

leeym

IS-IT--Management
Aug 20, 2004
338
US
We're in the midst of upgrading our network from NT to 2003 server, and have created batch file login scripts to map all network drives.

However, we'd still like to map to one legacy drive on an NT server, but since this is on a different domain, we're prompted every time to manually enter a username/password.

Is there a way to enter the username/password into the batch file for this one particular mapping?

Thanks
 
I don't know if this will help but this is a vb script that I use to map various network drives




Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile
strDriveLetter = "z:"
strRemotePath = "\\network path"
strUser = "username"
strPassword = "password"
strProfile = "false"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, strUser, strPassword
WScript.Echo "Server connection has been configured"
WScript.Quit

Merry non denominational winter festival!!!

 
That was quick, but do you have the same info for batch files?

Thanks
 
try this:

net user r: \\server\share /user:domain\user password
 
Establish a trust between the domains and you won't get prompted.

For a more comprehensive login script, refer to my FAQ faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
ok thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top