Tel Posted November 17, 2004 Share Posted November 17, 2004 Three of my users' Win2000 PC's need a drive mapped on another domain. As you all know Win2000 can't remember the logon credentials of another domain after a reboot. So what I would like to do is write a logon script that disconnects the current drive and creates a new one with the correct credentials.Does anybody have any idea on how I can do this, and what the correct code is? Link to comment Share on other sites More sharing options...
MadGutts Posted November 17, 2004 Share Posted November 17, 2004 Are the users in question set up on both domains?If so just map the drive in a login script with "net use x: \\machine-name\share-name"There is a registry way of doing it but i cant find the file in question at this time ! Link to comment Share on other sites More sharing options...
Br4tt3 Posted November 19, 2004 Share Posted November 19, 2004 net use X: \\server\shared folder /user:domain\username Link to comment Share on other sites More sharing options...
FAT64 Posted November 19, 2004 Share Posted November 19, 2004 Or using VBScript ...DriveLetter = "N:" 'must be capitalized, change drive letter accordingly RemotePath = "\\server\share" Set WShNetwork = WScript.CreateObject("WScript.Network")WShNetwork.MapNetworkDrive DriveLetter, RemotePath to disconnect use ...WShNetwork.RemoveNetworkDrive DriveLetter Link to comment Share on other sites More sharing options...
Br4tt3 Posted November 19, 2004 Share Posted November 19, 2004 As always... .vbs is alot nicer! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now