abb Posted May 21, 2008 Posted May 21, 2008 I've been looking through the forums and the help file for information on browsing a network for machines but have not been successful. I am working on a client that can connect to an application running on a remote server. However, instead of having the user enter the machine name or ip address I'd prefer to offer a select drop-down containing all the machine names of servers available on the network. If you have any thoughts or could point me in the right direction I'd be greatful. Thank you! ABB
abb Posted May 21, 2008 Author Posted May 21, 2008 (edited) This is what I am currently doing to achieve this but don't think it's the best solution. Please help. $machineList = GUICtrlCreateCombo("Select ...",77,57,235,200) $cmdNetView = RunWait(@ComSpec & " /c net view>netview.log", "", @SW_HIDE) If Not _FileReadToArray("netview.log",$aRecords) Then fnWriteLog("Error reading netview.log to array: " & @error) EndIf For $x = 1 to $aRecords[0] If StringLen($aRecords[$x]) <> 0 Then If StringInStr($aRecords[$x],"\\") Then $aFoo = StringSplit($aRecords[$x]," ") $bar = $bar & $aFoo[1] & "|" EndIf EndIf Next GUICtrlSetData($machineList,$bar) FileDelete("netview.log") Edited May 21, 2008 by abb
abb Posted May 22, 2008 Author Posted May 22, 2008 Anyone have an insight into a better way? Perhaps a native or user AutoIT function?
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