  .
          classname   .

procedure KillProgram(Classname: PChar; WindowTitle: PChar);
const
	PROCESS_TERMINATE=$0001;
var
	ProcessHandle: THandle;
	ProcessID: Integer;
	TheWindow: HWND;
begin
	TheWindow:=FindWindow(Classname, WindowTitle);
	GetWindowThreadProcessID(TheWindow, @ProcessID);
	ProcessHandle:=OpenProcess(PROCESS_TERMINATE, FALSE, ProcessId);
	TerminateProcess(ProcessHandle,4);
end;