Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use the method of getting a file version information. First we'd get <code>iexplore.exe</code> path.</p> <pre><code>function GetIEPath: string; var Reg: TRegistry; Len: Integer; begin Result := ''; Reg := TRegistry.Create; with Reg do begin try RootKey := HKEY_CLASSES_ROOT; OpenKeyReadOnly('CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32'); try Result := ReadString(''); finally CloseKey; Len := Length(Result); if Len &gt;= 2 then begin if(Result[Len] = '"') then Delete(Result, Len, 1); if(Result[1] = '"') then Delete(Result, 1, 1); end else begin Result := ''; end; end; finally Free; end; end; end; </code></pre> <p><code>{0002DF01-0000-0000-C000-000000000046}</code> is the CLSID for Internet Explorer. The default key value for <code>LocalServer32</code> is <code>iexplore.exe</code> path.</p> <p>Then, we use some API calls, as demonstrated by Simon Grossenbacher, on <a href="http://www.swissdelphicenter.ch/torry/showcode.php?id=27" rel="nofollow">this link</a>, to get a file version info. Modifying his function, we get to this:</p> <pre><code>function GetIEVersion: string; var IEPath: string; VerInfoSize: DWORD; VerInfo: Pointer; VerValueSize: DWORD; VerValue: PVSFixedFileInfo; Dummy: DWORD; begin Result := '0'; IEPath := GetIEPath; if IEPath = '' then Exit; VerInfoSize := GetFileVersionInfoSize(PChar(IEPath), Dummy); if VerInfoSize = 0 then Exit; GetMem(VerInfo, VerInfoSize); GetFileVersionInfo(PChar(IEPath), 0, VerInfoSize, VerInfo); VerQueryValue(VerInfo, '\', Pointer(VerValue), VerValueSize); with VerValue^ do begin Result := IntToStr(dwFileVersionMS shr 16); Result := Result + '.' + IntToStr(dwFileVersionMS and $FFFF); Result := Result + '.' + IntToStr(dwFileVersionLS shr 16); Result := Result + '.' + IntToStr(dwFileVersionLS and $FFFF); end; FreeMem(VerInfo, VerInfoSize); end; </code></pre> <p>Then, you just use, for example, this:</p> <pre><code>ShowMessage(GetIEVersion); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload