在WPF XBAP项目中遇到这样一个问题,程序在Windows 10上面无法运行。原因是因为Windows 10默认浏览器是Edge,而XBAP程序是需要在IE上面运行的。于是开始想办法修改Windows 10的默认浏览器。在Windows 10之前,只需要修改注册表的就可以了。将下面注册表的ProgId设置为IE.HTTP/IE.HTTPS即可。
HKEY_CURRENT_USER\ Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice
HKEY_CURRENT_USER\ Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice
Code:
class Program { private const string HTTP_KEY = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice"; private const string HTTPS_KEY = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice"; static void Main(延伸阅读
- ssh框架 2016-09-30
- 阿里移动安全 [无线安全]玩转无线电——不安全的蓝牙锁 2017-07-26
- 消息队列NetMQ 原理分析4-Socket、Session、Option和Pipe 2024-03-26
- Selective Search for Object Recognition 论文笔记【图片目标分割】 2017-07-26
- 词向量-LRWE模型-更好地识别反义词同义词 2017-07-26
- 从栈不平衡问题 理解 calling convention 2017-07-26
- php imagemagick 处理 图片剪切、压缩、合并、插入文本、背景色透明 2017-07-26
- Swift实现JSON转Model - HandyJSON使用讲解 2017-07-26
- 阿里移动安全 Android端恶意锁屏勒索应用分析 2017-07-26
- 集合结合数据结构来看看(二) 2017-07-26
学习是年轻人改变自己的最好方式

