Hi Coders!
I would like to execute a simple program.
I use this code:
program Exe_Execute;
uses
Classes, SysUtils, Process;
var
AProcess: TProcess;
begin
AProcess := TProcess.Create(nil);
AProcess.CommandLine := 'C:\Users\Lime\Desktop\test.exe';
AProcess.Options := AProcess.Options + [poWaitOnExit];
AProcess.Execute;
end.
When I run my Exe_Execute.exe program, it executes the test.exe. But the main program still run. It has a black window like a Command Prompt window. When I close the test.exe, then my Exe_Execute.exe program close too.
Is there any way to run the test.exe, than immediately close my Exe_Execute.exe program before I close the test.exe?
Thank you in advance.
Relative