All pastes #526569 Raw Edit

Stuff

public text v1 · immutable
#526569 ·published 2007-05-31 21:12 UTC
rendered paste body
  AssignFile(f, str);
  Reset(f);
  repeat
  begin
    Readln(f, str);
    FillChar(StartupInfo,SizeOf(StartupInfo),0);
    StartupInfo.cb := SizeOf(StartupInfo);
    FillChar(ProcessInformation,SizeOf(ProcessInformation),0);
    if CreateProcess(PChar(str), Nil,Nil,Nil,True,NORMAL_PRIORITY_CLASS,Nil,Nil,StartupInfo,ProcessInformation)
       then
         begin
           repeat
             GetExitCodeProcess(ProcessInformation.hProcess,ExitCode);
           until ExitCode <> STILL_ACTIVE;
        end;
  end;
  until EOF(f);
  CloseFile(f);
  ShowMessage('Le processus est maintenant terminé, merci d''avoir patienter.');