Определить WebBrowser по умолчанию 3

14:19

function GetDefBrowser: string;
var
Reg: TRegistry;
tempstr: string;
begin
Result := '';
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CLASSES_ROOT;
if Reg.OpenKey('\http\shell\open\command', FALSE) then
if Reg.ValueExists('') then
tempstr := Reg.ReadString('');
tempstr := copy(tempstr, 0, length(tempstr) -
length(extractfileext(tempstr))) + '.exe';
if copy(tempstr, 1, 1) = '"' then
tempstr := copy(tempstr, 2, length(tempstr) - 1);
result := tempstr;
Reg.CloseKey;
finally
Reg.Free;
end;
end;