Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-03

TProcess raises exception

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anton Tichawa

hello list,

I want to start a Win98 program from within another program. I tried to do this with TProcess, but TProcess.Create raises an exception ..

this is my code:

procedure StartProgram(ACommandLine: String);
var
  MyProcess: TProcess;
begin
  try
    MyProcess := TProcess.Create(ACommandLine, [poExecuteOnCreate]);
  except
    on E: Exception do Log('StartProgram Create ' + ACommandLine + ': ' +
      E.ClassName + ' ' + E.Message);
  end;
  ..

and the log file output is:

0 StartProgram Create C:\IOS.Exe: EINOUTERROR File not open

The file C:\IOS.Exe exists, and can be started manually .. am I doing something wrong?

thank you,

Anton.

Unknown author
to Anton Tichawa
Anton Tichawa wrote 5 lines
hello list, I want to start a Win98 program from within another program. I tried to do this with TProcess, but TProcess.Create raises an exception .. this is my code:

Please use a snapshot version. The TProcess class has been totally reworked so it is now a component; I have removed several bugs as well.

Michael.