Naveed 0 Posted July 20, 2010 Hi Peeps, First of all here is what i am currently trying to do. I am using the dsget command to get information from the active directory for a security group or computer. However the information returned from stdoutread is a long list and i dont know how to take this list and display in a gui window list? I suppose i could try and include a loop system which uses the string commands but that would be very longwinded, which is why i need some help with this. Here is the code i am using. #include <Constants.au3> $securitygroup = "SecurityGroup" Local $foo = Run(@ComSpec & " /c " & "dsget group " & '"cn=' & $securitygroup & ',ou=global groups,dc=test,dc=com,"' & " -members -expand", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $line Sleep(2000) While 1 $line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) Wend While 1 $line = StderrRead($foo) If @error Then ExitLoop MsgBox(0, "STDERR read:", $line) Wend And here is what the output looks like (see output.bmp) Any ideas?Output.bmp Share this post Link to post Share on other sites
PsaltyDS 39 Posted July 20, 2010 That's the awkward hard way to do it. Why not just use the COM interface to ADSI? There is a whole AD UDF (more than one actually) based on that. You can simply get the data without trying to tease it out of STDOUT. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites