I am trying to find Microsoft Edge version using the bellow C# code.
RegistryKey reg = Registry.ClassesRoot.OpenSubKey(@"Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages");
if(reg != null)
{
foreach(string subkey in reg.GetSubKeyNames())
{
if(subkey.StartsWith("Microsoft.MicrosoftEdge"))
{
Match rxEdgeVersion = null;
rxEdgeVersion = Regex.Match(subkey, @"(Microsoft.MicrosoftEdge_)(?<version>\d+\.\d+\.\d+\.\d+)(_neutral__8wekyb3d8bbwe)");
if (rxEdgeVersion.Success)
return EdgeVersion = rxEdgeVersion.Groups["version"].Value;
}
}
}
}
This function returns the version 44.18362.449.0. But when i directly checking in Edge browser =>Settings=>help (edge://settings/help) version is Version 84.0.522.40
These two version patterns are not matching, also i have no parallel installation of different edge versions.
Please help me to relate both versions which are from browser UI and by C#.
