var Form1: TForm1; AProcess: TProcess;implementation{ TForm1 }procedure TForm1.Button1Click(Sender: TObject);var appath: string;begin AProcess := TProcess.Create(nil); appath:=ExtractFilepath(application.exename); AProcess.CommandLine := appath+'hello.exe'; AProcess.Options := AProcess.Options + [poWaitOnExit]; AProcess.Execute; AProcess.Free;end;
CreateProcess(pwidechar('\program files\test\hello.exe'), Nil, Nil, Nil, False, CREATE_NEW_CONSOLE, Nil, Nil, StartupInfo, ProcessInformation);
appath:='\program files\test\';CreateProcess(pwidechar(appath+'hello.exe'), Nil, Nil, Nil, False, CREATE_NEW_CONSOLE, Nil, Nil, StartupInfo,ProcessInformation);
did you try :appath:='\program files\test\';appath:=appath+'hello.exe';CreateProcess(pwidechar(appath), Nil, Nil, Nil, False, CREATE_NEW_CONSOLE, Nil, Nil, StartupInfo,ProcessInformation);
uses ..., Windows;.... CreateProcess(...