Get Internet Explorer (IE) Version
How to get the MS Internet Explorer Version from the System Registry
Web Form Builder
Software for Beginner and Professionals
Learn more Trial version available!
check Design forms using a visual environment
check Form and design templates included
check Generated PHP script runs on your own website
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");