如何检查 C# 中是否安装了 Microsoft Edge Chromium [英] How to check if Microsoft Edge Chromium is installed in C#

查看:63
本文介绍了如何检查 C# 中是否安装了 Microsoft Edge Chromium的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 C# 中检测 Microsoft Edge Chromium 是否已安装并且在 Chromium 应覆盖旧"Edge 的同时不会检测到 Edge 仍在系统中的最佳方法是什么(最好使用 Windows 注册表)?

对于

参考文献:

  1. 如何查找所有浏览器安装在机器上

  2. 如何使用 Windows 开始菜单注册 Internet 浏览器或电子邮件客户端

What is the best way (preferably using Windows Registry) in C# to detect that Microsoft Edge Chromium is installed and not detect at the same time that Edge is still in system while Chromium should override "old" Edge?

For detecting old Edge usually we use Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages\Microsoft.MicrosoftEdge_ package in registry.

解决方案

I suggest you check the browser entry at the location below.

HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet

or

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet

The subkey HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet describes the Internet browser that is started when the user clicks the Internet icon on the Start menu. If that subkey is blank or missing, then the Internet icon on the Start menu is set to the system default stored in the second location at HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet , which describes all Internet browser applications that are installed on the system.

If MS Edge Chromium is installed then it will be on the list.

References:

  1. How to find all the browsers installed on a machine

  2. How to Register an Internet Browser or Email Client With the Windows Start Menu

这篇关于如何检查 C# 中是否安装了 Microsoft Edge Chromium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆