BrettF Posted April 11, 2008 Share Posted April 11, 2008 (edited) I was wondering if anyone had any ideas why the first one fails, but the second doesn't?? Am I missing something? $server = "\\Computer" $search = FileFindFirstFile ($server & "\*.*") MsgBox (0, $search, @error) $search = FileFindFirstFile ($Server & "\shared folder\*.*") MsgBox (0, $search, @error) Typo in code. Is there any better way to get shared folders from a computer? Edited April 11, 2008 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 11, 2008 Share Posted April 11, 2008 It looks like the first one won't work when the second one does work on your machine because of the type of connection you have to the other computer - you don't have enough permission. Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Dampe Posted April 11, 2008 Share Posted April 11, 2008 To me it looks like a Security Policy issue on the "server" computer. Try auditing some of the settings for the shared drive on the server, opening more permissions for people who connect to it. Link to comment Share on other sites More sharing options...
BrettF Posted April 11, 2008 Author Share Posted April 11, 2008 (edited) To me it looks like a Security Policy issue on the "server" computer. Try auditing some of the settings for the shared drive on the server, opening more permissions for people who connect to it.I am just testing on my own computer. If I need a password to access to it I just run the following, which gains me access. If $search = -1 Then If $domain <> "" Then $sdout = Run("net use " & $server & " /USER:" & $domain & "\" & $username & " " & $password, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Else $sdout = Run("net use " & $server & " /USER:" & $username & " " & $password, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) EndIf While 1 $line = StdoutRead($sdout) If @error Then ExitLoop ConsoleWrite (">> STDOUT read:" & $line & @CRLF) Wend While 1 $line = StderrRead($sdout) If @error Then ExitLoop ConsoleWrite (">> STDERR read:" & $line & @CRLF) Wend ConsoleWrite (">> STD read complete"& @CRLF) EndIf EDIT: The folder in the root is the only one. I can access just that folder as with the second example. Its just not working with the root. Edited April 11, 2008 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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