(((echo "some stuff" | wine myexe | tee stdout.txt) 3>&1 1>&2 2>&3 | tee stderr.txt) 3>&1 1>&2 2>&3) > mypipe 2>&1 But I don't think cmd.exe likes pipes nor redirection. I'd hate to have to resort to splitting myexe into two exe's so that I can see if the problem is in the quote section or the ordering section (UNLESS THERE IS A WINEDEBUG FLAG I CAN DECIPHER). Also, if only the ordering part is dying, maybe an app monitoring program can restart that for me.