How can I get the version IE installed in my computer?
A:
uses
Registry;
function GetIEVersion(Key: string): string;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software\Microsoft\Internet Explorer', False);
try
Result := Reg.ReadString(Key);
except
Result := '';
end;
Reg.CloseKey;
finally
Reg.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('IE-Version: ' + GetIEVersion('Version')[1] + '.' + GetIEVersion('Version')[3]);
ShowMessage('IE-Version: ' + GetIEVersion('Version'));
end;
Aaron Harun
2010-07-15 07:20:54
before I posted my question here, I've already seen this code but there's a comment there that this code couldn't retrieve the version if it reaches version 10 already. that's why i posted a question here.
jhodzzz
2010-07-15 09:16:34
+3
A:
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;
This function should return the currently installed version number of IE.
wimvds
2010-07-15 07:23:43
+1
A:
I've figured out a work-around on my problem so that I don't have to check for the version of the currently installed IE anymore. Thanks for the answers though. :)
jhodzzz
2010-07-15 09:14:55
oh..sorry..in case you haven't noticed, i'm also the one who posted this question..my intention on the post you commented was to let everyone know that i've already figured out the workaround on my problem..i'm new here..sorry.. :)
jhodzzz
2010-07-19 01:19:09