Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I programatically set the default browser in Windows 10

Tags:

c#

file-type

I want be able to change the default browser (and other associations) via a C# program similar to how browsers have a "Make Browser As Default" option.

I've tried changing HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice but Windows just detects tampering, even if I restore both the Hash and ProgId to a previous value. Seems Hash is unique, time based

like image 684
allanx2000 Avatar asked Apr 26 '16 13:04

allanx2000


1 Answers

You can do this by running a little program I wrote called Set Default Browser.

like image 85
Sam Avatar answered Oct 09 '22 15:10

Sam