[fpc-pascal]TProcess raises exception

Anton Tichawa anton.tichawa at chello.at
Sat Mar 2 18:04:45 CET 2002


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020302/6b0854c9/attachment.html>


More information about the fpc-pascal mailing list