AssignFile(f, str);
Reset(f);
while not EOF(f) do
begin
Readln(f, str);
ZeroMemory(@StartupInfo,SizeOf(StartupInfo));
StartupInfo.cb := SizeOf(StartupInfo);
ZeroMemory(@ProcessInformation,SizeOf(ProcessInformation));
if CreateProcess(PChar(str), Nil,Nil,Nil,True,NORMAL_PRIORITY_CLASS,Nil,Nil,StartupInfo,ProcessInformation)
then
WaitForSingleObject(processinformation.hprocess , INFINITE);
end;
CloseFile(f);
ShowMessage('Le processus est maintenant terminé, merci d''avoir patienter.');