Execute a DOS program or batch file et get outputs (text in the console) via an event OnNewLine(Sender: TObject; NewLine: string; OutputType: TOutputType). You do not need to wait the end of the execution to get outputs, you get it line by line. You can also send text to console input via the procedure SendLine(Value: string; Eol: Boolean).