Создай два процесса, получи на каждый pi, завершил эти процессы
запуск чужой программы
http://www.delphifaq.ru/razrabotka-prilozheniy-v-sisteme-delphi/83-zapusk-drugikh-prilozheniy.html
CreateProcess
var SI: TStartupInfo; заполняем нулями PI: TProcessInformation; эту структуру заполняет CreateProcess begin FillChar(SI, SizeOf(SI), 0); SI.cb := SizeOf(SI); if not CreateProcess('C:\Program Files\Mozilla Firefox\firefox.exe', nil,nil,nil,false,Normal_Priority_Class,nil,nil,SI,PI) then raise Exception.CreateFmt('Error Code %d',[GetLastError]); end;
http://delfcode.ru/publ/delphi/prim/rabota_s_chuzhimi_oknami_v_delphi_cherez_winapi/4-1-0-116
http://platonov-andrei.narod.ru/Delphi/FuncAPI/index.htm
http://www.programmersforum.ru/showthread.php?t=181672
TerminateProcess
перебор окон
http://www.delphisources.ru/pages/faq/base/enumwindows.html
http://www.delphimaster.ru/cgi-bin/forum.pl?id=1420779373&n=10
http://platonov-andrei.narod.ru/Delphi/FuncAPI/EnumWindows.htm
http://w32api.narod.ru/functions/GetWindowWord.html
http://rsdn.org/forum/delphi/2046141.hot
https://it.wikireading.ru/25846
Kill process http://www.delphimaster.net/view/7-15955
http://www.programmersforum.ru/showthread.php?t=207417
http://www.delphiplus.org/delphi-v-shutku-i-v-serjez/32-zakrit-chuzhoe-okno.html