Sign in to follow this  
Followers 0
gfunk999

Another STDOUT_CHILD question (sorry)

2 posts in this topic

Hi all, hope all is well,

After two days of searching and looking through very good examples (i.e. from embedding the cmd.exe to a gui, to outputting to a > txt file and then reading back to a variable, etc...) I give up. I cannot understand why chkdsk.exe won't output? If I replace it with a dir or ping everything works perfect.

#include <Constants.au3>

Local $foo = Run(@ComSpec & " /c chkdsk.exe", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
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

MsgBox(0, "Debug", "Exiting...")

Share this post


Link to post
Share on other sites



You may want to try this out. It worked for me.

http://www.autoitscript.com/forum/index.php?showtopic=99485&st=0&p=714332&hl=chkdsk&fromsearch=1&#entry714332

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0