ds10025 Posted February 5, 2007 Share Posted February 5, 2007 Hi I want to use DriveMapAdd d: \\servername\$username $password. What is the best way of doing this? Link to comment Share on other sites More sharing options...
evilertoaster Posted February 5, 2007 Share Posted February 5, 2007 DriveMapAdd("D:","\\servername",0,$username,$password) ? Link to comment Share on other sites More sharing options...
ds10025 Posted February 5, 2007 Author Share Posted February 5, 2007 DriveMapAdd("D:","\\servername",0,$username,$password) ?Thanks for the reply spammer.But, I would like to set the username to be the shared folder.Eg \\servername\%username%I know this is possible using net use. Just wonder if it is possible using drivemapadd. Link to comment Share on other sites More sharing options...
Danny35d Posted February 5, 2007 Share Posted February 5, 2007 I know this is possible using net use. Just wonder if it is possible using drivemapadd.Use macro @UserNameDriveMapAdd("D:","\\servername\" & @UserName) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
tAKTelapis Posted February 6, 2007 Share Posted February 6, 2007 Ohh, i see, he also needs to provide the username and password for the connection.. If you need to supply alternate credentials for the purpose of mapping the drive, but want the drive to map for the currently logged in user: $Username = "Username" $Password = "Password" DriveMapAdd("D:","\\servername"&@UserName,0,$username,$password) this will map the drive letter D: to the Currently logged in user, using the Username and Password provided by setting the two variables at the top of the script. Link to comment Share on other sites More sharing options...
ds10025 Posted February 6, 2007 Author Share Posted February 6, 2007 Use macro @UserNameDriveMapAdd("D:","\\servername\" & @UserName)ThanksI'll give it a try. Link to comment Share on other sites More sharing options...
ds10025 Posted February 6, 2007 Author Share Posted February 6, 2007 Ohh, i see, he also needs to provide the username and password for the connection.. If you need to supply alternate credentials for the purpose of mapping the drive, but want the drive to map for the currently logged in user: $Username = "Username" $Password = "Password" DriveMapAdd("D:","\\servername"&@UserName,0,$username,$password) this will map the drive letter D: to the Currently logged in user, using the Username and Password provided by setting the two variables at the top of the script. Thanks again this might work. 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