Get Internet Explorer (IE) Version

How to get the MS Internet Explorer Version from the System Registry

The Internet Explorer version is stored in the registry key: HKLM\SOFTWARE\Microsoft\Internet Explorer

Important: Newer IE versions use the value svcVersion, older versions use Version, so we need to check svcVersion first and fall back to Version if svcVersion is not set. Version might not contain the current version and is used for compatibility issues.

 

Helper function to read a string value from the registry:

CString GetStringFromReg(HKEY keyParent, CString keyName, CString keyValName)
{
    CRegKey key;
    CString out;
    if (key.Open(keyParent, keyName, KEY_READ) == ERROR_SUCCESS)
    {
        ULONG len=256;
        key.QueryStringValue(keyValName, out.GetBuffer(256), &len);
        out.ReleaseBuffer();
        key.Close();
    }
    return out;
}

 

Get the installed Internet Explorer version:

// check svcVersion first
CString ieversion = GetStringFromReg(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Internet Explorer", L"svcVersion");
// use Version if svcVersion is not set
if (ieversion.IsEmpty()) ieversion = GetStringFromReg(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Internet Explorer", L"Version");

Disclaimer: The information on this page is provided "as is" without warranty of any kind. Further, Arclab Software OHG does not warrant, guarantee, or make any representations regarding the use, or the results of use, in terms of correctness, accuracy, reliability, currentness, or otherwise. See: License Agreement