Get/set default page of IE

Posted in Internet

Information about default page of Internet Explorer you may find at 'HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main' path ('Start page' parameter). Use standard functions to set/get this information from registry.

uses Registry;
...
// Get default page
procedure TForm1.Button1Click(Sender: TObject);
begin
  with TRegistry.Create do
  begin
    RootKey:=HKEY_CURRENT_USER;
    if OpenKey('Software\Microsoft\Internet Explorer\Main', TRUE) then
      ShowMessage(ReadString('Start Page'))
    else
      MessageDlg('Registry read error', mtError, [mbOk], 0);
    CloseKey;
  end;
end;