﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
690	Problems with Run and chkdsk	anonymous	Valik	"I updated to the latest Public (3.2.12.1). I've got problems with chkdsk and Run or StdoutRead.
The following script return not correct return data.
If I change ""chdsk"" to ""sort"" the returned data is correct!

I'm I still doing it wrong ?
But were is the misstake?
{{{
#include <Constants.au3>

Local $foo, $cmd
Local $line
;$cmd = @ComSpec & "" /c chkdsk F: /f/r""
$cmd = @ComSpec & "" /c chkdsk /?""

$foo = Run($cmd, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

dbg($foo)
dbg($cmd)
While 1

    $line = StdoutRead($foo)
    If $line<>"""" Then

        dbg(""StdoutRead: "" & $line)

    EndIf
    If Not ProcessExists($foo) Then

        ExitLoop

    EndIf

Wend

Exit

Func dbg($msg, $error=@error, $extended=@extended, $ScriptLineNumber=@ScriptLineNumber)

    Local $out = ""("" & $ScriptLineNumber & "")("" & $error & "")("" & $extended & "") := "" & $msg
    ;Output to application attaching a console to the script engine
    ConsoleWrite($msg & @CRLF)
    ;Output to debugger (dbgview.exe)
    DllCall(""kernel32.dll"", ""none"", ""OutputDebugString"", ""str"", $out)

EndFunc
}}}"	Bug	closed		AutoIt	3.2.12.1	Blocking	No Bug		
