你如何使用Delphi获得当前安装的IE版本?

jho*_*zzz 2 delphi internet-explorer

如何在计算机中安装IE版本?


我已经找到解决问题的方法,以便我不必再检查当前安装的IE的版本.谢谢你的答案.:)

wim*_*vds 8

uses
  Registry;

function GetIEVersion : string;
var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_LOCAL_MACHINE;
    Reg.OpenKeyReadOnly('Software\Microsoft\Internet Explorer');
    try
      Result := Reg.ReadString('Version');
    except
      Result := '';
    end;
    Reg.CloseKey;
  finally
    Reg.Free;
  end;
end;
Run Code Online (Sandbox Code Playgroud)

此函数应返回当前安装的IE版本号.