专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > WinForm

winform 透过驱动注册ID检测是否已安装驱动

发布时间:2011-06-23 13:49:15 文章来源:www.iduyao.cn 采编人员:星星草
winform 通过驱动注册ID检测是否已安装驱动
 1  public bool IsRegistered()
 2         {
 3             string clsid = ConfigurationManager.AppSettings["clsid"];
 4             //参数检查
 5             Debug.Assert(!String.IsNullOrEmpty(clsid), "clsid 不应该为空");
 6             //设置返回值
 7             bool result = false;
 8             //检查方法,查找注册表是否存在指定的clsid
 9             string key = $@"CLSID\{{{clsid}}}";
10             RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(key);
11             if (regKey != null)
12             {
13                 result = true;
14             }
15             return result;
16         }
View Code

 

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: