TProcess cant Execute Programm lazarus / 21-General ---------------------------------------------------------------------- Weitentaaal · 2021-06-30 11:23 Hello Guys, was wondering if Someone could answer this Thread : https://forum.laza rus.freepascal.org/index.php/topic,8578.msg41444.html#msg41444 I get the same Error Message please Help. Process is not Running Code below: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i              Bb := TProcess.Create(Nil);                //Some not that important Code                try                  Bb.Executable:=('C:\WGKBlck\KVS\KVDesigner.exe');                  //Bb.Parameters.Add('C:\WGKBlck\Data\WGK2KVS.KVS') //not need just a normal exe without any Params                   Bb.Execute;             finally                  Bb.Free;               end; ---------------------------------------------------------------------- vangli · 2021-06-30 11:45 Have you defined "Bb" as a variable? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  Bb : TProcess; ---------------------------------------------------------------------- Zvoni · 2021-06-30 11:54 I'm missing poWaitOnExit for the Options As of now (the code we see), you execute, and free it immediatley afterwards. Maybe it does execute, you just don't see it ---------------------------------------------------------------------- Bart · 2021-06-30 12:08 poWaitOnExit is an option, not a must. The process is only freead after Execute returns. At that point the executable is already running (or it failed to do so). Try to do some simple debugging Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  Bp: TProcess;  Err: Integer;begin  Bp := TProcess.Create(nil);  Bp.Options := [poWaitOnExit]; //not really needed  Bp.Executable := 'C:\WGKBlck\KVS\KVDesigner.exe';  try    Bp.Execute;  except    on E: EProcess do    begin      Err := GetLastOSError;      writeln(Format('GetLastOSError = %d: "%s"',[Err,SysErrorMessage(Err)]));    end;  end;  writeln('ExitCode: ',Bp.ExitCode);  writeln('ExitStatus: ',Bp.ExitStatus);  Bp.Free;end; Since I don;t have this file it says: Code: [Select]GetLastOSError = 2: "Het systeem kan het opgegeven bestand niet vinden." //The system cannot find the given path ExitCode: 0 ExitStatus: 0 Bart