Jump to content
Sign in to follow this  
ning

UNC paths requiring login

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

<{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]

Share this post


Link to post
Share on other sites

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 by SumTingWong

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...