Sorry Guys,
I have to wake up the thread
The > SysUtils.ExecuteProcess(appath+'hello.exe',[]); < is working, but unfortunately wait for the termination of the new process. So Starter.exe hangs up, till Hello.exe doesn't close. This is not OK for me, starter has to work further.
Btw, I couldn't find any property or setting for ExecuteProcess to _don't_wait_ for the end of the started process.
Back to TProcess.
If I try
appath:=ExtractFilepath(application.exename);
AProcess := TProcess.Create(nil);
AProcess.CommandLine := appath+'hello.exe';
AProcess.Execute;
It occurs an error, as I wrote before: "Failed to execute hello.exe : 87."
It doesn't matter, if I write "hello2.exe", "anything.exe", I always get "Failed to execute .... : 87"
Regarding to MSDN, I've found only one topic:
http://msdn2.microsoft.com/en-us/library/ms932980.aspxHere, as far as I see, ErrorCode 87 is: The parameter is incorrect.
But which parameter?
Do I need set something more? Checking the TProcess, I cat get more
Please help, it would be important to start an application! :roll: