public static List <InstalledBrowserInfo> GetBrowsers() { RegistryKey registryKey1 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Clients\\StartMenuInternet") ?? Registry.LocalMachine.OpenSubKey("SOFTWARE\\Clients\\StartMenuInternet"); string[] subKeyNames = registryKey1.GetSubKeyNames(); List <InstalledBrowserInfo> installedBrowserInfoList = new List <InstalledBrowserInfo>(); for (int index = 0; index < subKeyNames.Length; ++index) { InstalledBrowserInfo installedBrowserInfo = new InstalledBrowserInfo(); RegistryKey registryKey2 = registryKey1.OpenSubKey(subKeyNames[index]); installedBrowserInfo.Name = (string)registryKey2.GetValue((string)null); RegistryKey registryKey3 = registryKey2.OpenSubKey("shell\\open\\command"); installedBrowserInfo.Path = registryKey3.GetValue((string)null).ToString().StripQuotes(); installedBrowserInfo.Version = installedBrowserInfo.Path == null ? "Unknown Version" : FileVersionInfo.GetVersionInfo(installedBrowserInfo.Path).FileVersion; installedBrowserInfoList.Add(installedBrowserInfo); } InstalledBrowserInfo edgeVersion = UserInfoHelper.GetEdgeVersion(); if (edgeVersion != null) { installedBrowserInfoList.Add(edgeVersion); } return(installedBrowserInfoList); }
// Token: 0x0600029F RID: 671 RVA: 0x0000B114 File Offset: 0x00009314 public static List <InstalledBrowserInfo> GetBrowsers() { List <InstalledBrowserInfo> list = new List <InstalledBrowserInfo>(); try { RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Clients\\StartMenuInternet"); if (registryKey == null) { registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Clients\\StartMenuInternet"); } string[] subKeyNames = registryKey.GetSubKeyNames(); for (int i = 0; i < subKeyNames.Length; i++) { InstalledBrowserInfo installedBrowserInfo = new InstalledBrowserInfo(); RegistryKey registryKey2 = registryKey.OpenSubKey(subKeyNames[i]); installedBrowserInfo.Name = (string)registryKey2.GetValue(null); RegistryKey registryKey3 = registryKey2.OpenSubKey("shell\\open\\command"); installedBrowserInfo.Path = registryKey3.GetValue(null).ToString().StripQuotes(); if (installedBrowserInfo.Path != null) { installedBrowserInfo.Version = FileVersionInfo.GetVersionInfo(installedBrowserInfo.Path).FileVersion; } else { installedBrowserInfo.Version = "Unknown Version"; } list.Add(installedBrowserInfo); } InstalledBrowserInfo edgeVersion = UserInfoHelper.GetEdgeVersion(); if (edgeVersion != null) { list.Add(edgeVersion); } } catch (Exception) { } return(list); }