function KillProcess(ExeName: string): LongBool;
var
B: BOOL;
ProcList: THandle;
PE: TProcessEntry32;
begin
Result := False;
ProcList := CreateToolHelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PE.dwSize := SizeOf(PE);
B := Process32First(ProcList, PE);
while B do begin
if (UpperCase(PE.szExeFile) = UpperCase(ExtractFileName(ExeName))) then
Result := TerminateProcess(OpenProcess($0001, False, PE.th32ProcessID), 0);
B := Process32Next(ProcList, PE);
end;
CloseHandle(ProcList);
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i:integer;
s:string;
begin
WinExec('taskkill /F /httpd.exe-w',0);
for i := 0 to 10 do begin
KillProcess('HTTPAN~'+inttostr(i)+'.exe');
KillProcess('HttpAnalyzerStdV'+inttostr(i)+'.exe');
end;
SendMessage(FindWindow(nil,'HTTP Analyzer V4'),WM_Close,0,0);
SendMessage(FindWindow(nil,'HTTP Analyzer V5'),WM_Close,0,0);
SendMessage(FindWindow(nil,'HTTP Analyzer V6'),WM_Close,0,0);
SendMessage(FindWindow(nil,'HTTP Analyzer V7'),WM_Close,0,0);
SendMessage(FindWindow(nil,'HTTP Analyzer V8'),WM_Close,0,0);
SendMessage(FindWindow(nil,'HTTP Analyzer V3'),WM_Close,0,0);
SendMessage(FindWindow(nil,'OllyDbg'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Charles 3.6'),WM_Close,0,0);
SendMessage(FindWindow(nil,'httpd.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Wireshark.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'SoftICE'),WM_Close,0,0);
SendMessage(FindWindow(nil,'ProcessHacker.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Process Hacker.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Analyzer'),WM_Close,0,0);
SendMessage(FindWindow(nil,'CommView.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Fiddler.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Wireshark.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'Analyzer.exe'),WM_Close,0,0);
SendMessage(FindWindow(nil,'SoftICE.exe'),WM_Close,0,0);
end;