Hi.
Local $foo = Run("powershell.exe", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) <-- Not Working
Local $foo = Run("cmd.exe", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)
Sleep(2000)
StdinWrite($foo, "hostname" & @CRLF & "get-date" & @CRLF )
StdinWrite($foo)
Sleep(2000)
; Read from child's STDOUT and show
Local $data
While True
$data &= StdoutRead($foo)
If @error Then ExitLoop
ConsoleWrite("<>")
Sleep(25)
WEnd
ConsoleWrite( $data &