[ autoit ]
#RequireAdmin #include <Constants.au3> ; Demonstrates the use of StdinWrite() Local $foo = Run("cmd", @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) ; Write string to be sorted to child sort.exe's STDIN $local = "localhost" StdinWrite($foo, $local) ; Calling with no 2nd arg closes stream StdinWrite($foo) ; Read from child's STDOUT and show Local $data While True $data &= StdoutRead($foo) If @error Then ExitLoop Sleep(25) WEnd MsgBox(0, "Debug", $data)