MrBeatnik Posted February 21, 2012 Share Posted February 21, 2012 (edited) Hi folks. The following works fine: #Include <File.au3> #Include <Array.au3> $res=DriveMapAdd("X:", "\\server\path",0) msgbox(0,@error,$res) $networkFileList=_FileListToArray("x:","*",1) If @Error=4 Then MsgBox (0,"","No Files Found.") Exit EndIf _ArrayDisplay($networkFileList,"$FileList") However, if I change the Map code to say: $res=DriveMapAdd("X:", "\\server\path",0,"domain\user","password") It fails with @error 1 - "Undefined / Other error". In the first scenario, I am logged into the domain as myself. This is true for the second, but I just add my user/pass to the command (it would actually be another user/pass being used, but if I can't even get my own to work, how will I get other credentials working...). The server is actually a clustered DFS... but my account still has access to it (as proven by the first scenario). Is there any reason why this would happen? I know that if I point the second scenario to my own machine (\\127.0.0.1\c$\temp) it maps fine, so is this an issue with the function and DFS (using kerberos)? Any way around this that anyone knows of? Edited February 21, 2012 by MrBeatnik Please correct me if I am wrong in any of my posts. I like learning from my mistakes too. Link to comment Share on other sites More sharing options...
AdamUL Posted February 21, 2012 Share Posted February 21, 2012 What is returned by @extended with @error = 1? This is the Windows API return code. This can help track down the issue. Adam Link to comment Share on other sites More sharing options...
MrBeatnik Posted February 21, 2012 Author Share Posted February 21, 2012 What is returned by @extended with @error = 1? This is the Windows API return code. This can help track down the issue.AdamGood call, which gives me a slight /facepalm: ERROR_SESSION_CREDENTIAL_CONFLICT 1219 (0x4C3) Althought I find this strange... it maps scenario 1, but not 2 - but surely it's using the same credentials in both cases. Yes, I do have a mapping to another share on the same DFS... but that doesn't really explain why it works with one method, but not the other. In any case, I have altered the share to point to another DFS path and it maps ok..., so it's not a DFS issue. Thanks for pointing that out! Kudos! Please correct me if I am wrong in any of my posts. I like learning from my mistakes too. Link to comment Share on other sites More sharing options...
AdamUL Posted February 21, 2012 Share Posted February 21, 2012 Glad, I could help. Adam 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