#include #include #include #include #include #include #include #include #include #include #include #include $sCommands = "ipconfig /all" $iPID = Run(@ComSpec & " /c " & $sCommands, "", @SW_HIDE , $stdout_child) $sOutput = "" $sString = $sOutput $hWnd_file = FileOpen("\\pscfilesrv\psc$\Test2.txt", $FO_APPEND) FileWrite($hWnd_file, $sOutput & @CRLF) FileClose($hWnd_file) ConsoleWrite("This is the current state of the string>" & $sString & "<" & @CRLF) While 1 $sOutput &= StdoutRead($iPID) If @error Then ExitLoop EndIf WEnd msgbox(0, '' , $sOutput)