...obtain the path to the default webbrowser?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: Internet / LAN

uses
  
Registry;

{....}

procedure TForm1.Button1Click(Sender: TObject);
var
  
Reg: TRegistry;
  KeyName: string;
  ValueStr: string;
begin
  
Reg := TRegistry.Create;
  try
    
Reg.RootKey := HKEY_CLASSES_ROOT;
    KeyName  := 'htmlfile\shell\open\command';
    if Reg.OpenKey(KeyName, False) then
    begin
      
ValueStr := Reg.ReadString('');
      Reg.CloseKey;
      Label1.Caption := ValueStr;
    end
    else
      
ShowMessage('No Default Webbrowser !');
  finally
    
Reg.Free;
  end;
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base