program LauncherTest1; {$mode objfpc}{$H+} uses {$IFDEF UNIX} cthreads, {$ENDIF} Classes, SysUtils, process; var ExternalApp: string; Params: TStringList; AProcess: TProcess; begin ExternalApp := 'notepad'; AProcess := TProcess.Create(nil); Params := TStringList.Create; try Params.Add('LauncherTest1.lpr'); AProcess.Executable := ExternalApp; AProcess.Parameters.AddStrings(Params); AProcess.Options := [poNoConsole]; try WriteLn('Starting: ', ExternalApp); AProcess.Execute; WriteLn('Success. Closing launcher...'); except on E: Exception do begin WriteLn('Error: ', E.Message); end; end; finally Params.Free; AProcess.Free; end; Sleep(1000); end.