On Sun, Mar 24, 2019 at 11:41 PM Bart <bartjun...@gmail.com> wrote: > > Sorry, I just never use that stuff in my programs.
In a simple test program I can make this work withou a console wndow popping up: procedure TForm1.Button1Click(Sender: TObject); var S: String; begin Proc.Executable := 'C:\pp\bin\i386-win32\fpcmkcfg.exe'; Proc.Options := [poWaitOnExit,poUsePipes]; if paramstr(1)='no' then Proc.Options := [poWaitOnExit,poNoConsole,poUsePipes]; Proc.Parameters.Add('-V'); Proc.Execute; SetLength(S, Proc.Output.NumBytesAvailable); wr('Proc.Output.NumBytesAvailable='+IntToSTr(Proc.Output.NumBytesAvailable)); if Proc.Output.NumBytesAvailable>0 then Proc.Output.Read(S[1], Proc.Output.NumBytesAvailable) else S:='No sigar...'; wr(format('S= "%s"',[S])); wr('Proc.ExitCode='+Proc.ExitCode.ToHexString+ ', Proc.ExitStatus='+ Proc.ExitStatus.ToHexString); Proc.Free; end; So, now I'm not sure why I see 2 console windows popping in and out of existence when starting IDE... -- Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal