ning Posted June 8, 2005 Share Posted June 8, 2005 Hello, I'm using FileChangeDir() to access files on a network share using UNC syntax, i.e. \\server\share\. The problem is, I can't access the folder in Windows without typing a username and password (which I know, obviously ). How can I connect to the folder in AutoIt? FileChangeDir() doesn't have options for a username and password, and I can't find an answer in the documentation or the forums. Can anyone help? cheers ben Link to comment Share on other sites More sharing options...
herewasplato Posted June 8, 2005 Share Posted June 8, 2005 Hello,I'm using FileChangeDir() to access files on a network share using UNC syntax, i.e. \\server\share\. The problem is, I can't access the folder in Windows without typing a username and password (which I know, obviously ). How can I connect to the folder in AutoIt? FileChangeDir() doesn't have options for a username and password, and I can't find an answer in the documentation or the forums. Can anyone help?cheersben<{POST_SNAPBACK}>Would RunAsSet and RunWait work for you?See this post or search for other posts.http://www.autoitscript.com/forum/index.php?showtopic=8241 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
SumTingWong Posted June 9, 2005 Share Posted June 9, 2005 (edited) You need to use DriveMapAdd to authenticate and connect to the remote share first. DriveMapAdd( "device", "remote share" [, flags [, "user" [, "password"]]] ) Pass "device" as an empty string if you dont want to map a drive. Don't forget to call DriveMapDel when you're done. Edited June 9, 2005 by SumTingWong Link to comment Share on other sites More sharing options...
ning Posted June 9, 2005 Author Share Posted June 9, 2005 That's it - DriveMapAdd did the trick! Thanks very much. I thought that I would have to map a drive if I used DriveMapAdd, but clearly I didn't read the documentation thoroughly enough ben 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