Get program directory.

procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := ExtractFilePath(Application.exename);
end;