├── .gitattributes ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── AUTHORS ├── EdgeDeflector.sln ├── EdgeDeflector ├── App.config ├── EdgeDeflector.csproj ├── Icon.ico ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── resources │ ├── nsis_installer.nsi │ └── test-links.txt ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.cs diff=csharp -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://www.buymeacoffee.com/aleksandersen", "https://flattr.com/@Aleksandersen"] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Please follow the troubleshooting steps first! 11 | https://github.com/da2x/EdgeDeflector/wiki/Troubleshooting 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Actual behavior/describe the bug:** 24 | A clear and concise description of what happen instead. 25 | 26 | **Details:** 27 | - Windows version: (Press Win+R, type `winver`, and include the full version number) 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User-specific files 2 | *.suo 3 | *.user 4 | *.userosscache 5 | *.sln.docstates 6 | 7 | # Build results 8 | [Dd]ebug/ 9 | [Dd]ebugPublic/ 10 | [Rr]elease/ 11 | [Rr]eleases/ 12 | x64/ 13 | x86/ 14 | bld/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | [Ll]og/ 18 | 19 | # Visual Studio 2015 cache/options directory 20 | .vs/ 21 | 22 | # MSTest test Results 23 | [Tt]est[Rr]esult*/ 24 | [Bb]uild[Ll]og.* 25 | 26 | # NUNIT 27 | *.VisualState.xml 28 | TestResult.xml 29 | 30 | # Build Results of an ATL Project 31 | [Dd]ebugPS/ 32 | [Rr]eleasePS/ 33 | dlldata.c 34 | 35 | # DNX 36 | project.lock.json 37 | project.fragment.lock.json 38 | artifacts/ 39 | 40 | *_i.c 41 | *_p.c 42 | *_i.h 43 | *.ilk 44 | *.meta 45 | *.obj 46 | *.pch 47 | *.pdb 48 | *.pgc 49 | *.pgd 50 | *.rsp 51 | *.sbr 52 | *.tlb 53 | *.tli 54 | *.tlh 55 | *.tmp 56 | *.tmp_proj 57 | *.log 58 | *.vspscc 59 | *.vssscc 60 | .builds 61 | *.pidb 62 | *.svclog 63 | *.scc 64 | 65 | # Chutzpah Test files 66 | _Chutzpah* 67 | 68 | # Visual C++ cache files 69 | ipch/ 70 | *.aps 71 | *.ncb 72 | *.opendb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | *.VC.db 77 | *.VC.VC.opendb 78 | 79 | # Visual Studio profiler 80 | *.psess 81 | *.vsp 82 | *.vspx 83 | *.sap 84 | 85 | # TFS 2012 Local Workspace 86 | $tf/ 87 | 88 | # Guidance Automation Toolkit 89 | *.gpState 90 | 91 | # ReSharper is a .NET coding add-in 92 | _ReSharper*/ 93 | *.[Rr]e[Ss]harper 94 | *.DotSettings.user 95 | 96 | # JustCode is a .NET coding add-in 97 | .JustCode 98 | 99 | # TeamCity is a build add-in 100 | _TeamCity* 101 | 102 | # DotCover is a Code Coverage Tool 103 | *.dotCover 104 | 105 | # NCrunch 106 | _NCrunch_* 107 | .*crunch*.local.xml 108 | nCrunchTemp_* 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | # TODO: Comment the next line if you want to checkin your web deploy settings 137 | # but database connection strings (with potential passwords) will be unencrypted 138 | #*.pubxml 139 | *.publishproj 140 | 141 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 142 | # checkin your Azure Web App publish settings, but sensitive information contained 143 | # in these scripts will be unencrypted 144 | PublishScripts/ 145 | 146 | # NuGet Packages 147 | *.nupkg 148 | # The packages folder can be ignored because of Package Restore 149 | **/packages/* 150 | # except build/, which is used as an MSBuild target. 151 | !**/packages/build/ 152 | # Uncomment if necessary however generally it will be regenerated when needed 153 | #!**/packages/repositories.config 154 | # NuGet v3's project.json files produces more ignoreable files 155 | *.nuget.props 156 | *.nuget.targets 157 | 158 | # Microsoft Azure Build Output 159 | csx/ 160 | *.build.csdef 161 | 162 | # Microsoft Azure Emulator 163 | ecf/ 164 | rcf/ 165 | 166 | # Windows Store app package directories and files 167 | AppPackages/ 168 | BundleArtifacts/ 169 | Package.StoreAssociation.xml 170 | _pkginfo.txt 171 | 172 | # Visual Studio cache files 173 | # files ending in .cache can be ignored 174 | *.[Cc]ache 175 | # but keep track of directories ending in .cache 176 | !*.[Cc]ache/ 177 | 178 | # Others 179 | ClientBin/ 180 | ~$* 181 | *~ 182 | *.dbmdl 183 | *.dbproj.schemaview 184 | *.jfm 185 | *.pfx 186 | *.publishsettings 187 | node_modules/ 188 | orleans.codegen.cs 189 | 190 | # Since there are multiple workflows, uncomment next line to ignore bower_components 191 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 192 | #bower_components/ 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # Paket dependency manager 238 | .paket/paket.exe 239 | paket-files/ 240 | 241 | # FAKE - F# Make 242 | .fake/ 243 | 244 | # JetBrains Rider 245 | .idea/ 246 | *.sln.iml 247 | 248 | # CodeRush 249 | .cr/ 250 | 251 | # Python Tools for Visual Studio (PTVS) 252 | __pycache__/ 253 | *.pyc -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Daniel Aleksandersen (da2x) 2 | Mark Young (tip2tail) 3 | Joakim Skoglund (voltura) 4 | Wilfred Hughes (Wilfred) 5 | Ajay kumar (ajay4q) 6 | -------------------------------------------------------------------------------- /EdgeDeflector.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31129.286 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EdgeDeflector", "EdgeDeflector\EdgeDeflector.csproj", "{64E191BC-E8CE-4190-939E-C77A75AA0E28}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {64E191BC-E8CE-4190-939E-C77A75AA0E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {64E191BC-E8CE-4190-939E-C77A75AA0E28}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {64E191BC-E8CE-4190-939E-C77A75AA0E28}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {64E191BC-E8CE-4190-939E-C77A75AA0E28}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = TRUE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /EdgeDeflector/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /EdgeDeflector/EdgeDeflector.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {64E191BC-E8CE-4190-939E-C77A75AA0E28} 8 | WinExe 9 | EdgeDeflector 10 | EdgeDeflector 11 | v4.8 12 | 512 13 | true 14 | 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 1.0.0.%2a 27 | false 28 | false 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | true 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | false 41 | 42 | 43 | AnyCPU 44 | pdbonly 45 | true 46 | bin\Release\ 47 | TRACE 48 | prompt 49 | 4 50 | false 51 | 52 | 53 | EdgeDeflector.Program 54 | 55 | 56 | Icon.ico 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | False 79 | Microsoft .NET Framework 4.6 %28x86 and x64%29 80 | true 81 | 82 | 83 | False 84 | .NET Framework 3.5 SP1 85 | false 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /EdgeDeflector/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/da2x/EdgeDeflector/23ab3f6c12f3dd56be629a93d247fbe5a4fe62a6/EdgeDeflector/Icon.ico -------------------------------------------------------------------------------- /EdgeDeflector/Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2017–2021 Daniel Aleksandersen 3 | * SPDX-License-Identifier: MIT 4 | * License-Filename: LICENSE 5 | */ 6 | 7 | using System; 8 | using System.Collections.Specialized; 9 | using System.Diagnostics; 10 | using System.Text.RegularExpressions; 11 | using System.Web; 12 | 13 | namespace EdgeDeflector 14 | { 15 | class Program 16 | { 17 | static bool IsUri(string uristring) 18 | { 19 | try 20 | { 21 | Uri uri = new Uri(uristring); 22 | return true; 23 | } 24 | catch (UriFormatException) 25 | { 26 | } 27 | catch (ArgumentNullException) 28 | { 29 | } 30 | return false; 31 | } 32 | 33 | static bool IsHttpUri(string uri) 34 | { 35 | return uri.StartsWith("HTTPS://", StringComparison.OrdinalIgnoreCase) || uri.StartsWith("HTTP://", StringComparison.OrdinalIgnoreCase); 36 | } 37 | 38 | static bool IsMsEdgeUri(string uri) 39 | { 40 | return uri.StartsWith("MICROSOFT-EDGE:", StringComparison.OrdinalIgnoreCase) && !uri.Contains(" "); 41 | } 42 | 43 | static bool IsNonAuthoritativeWithUrlQueryParameter(string uri) 44 | { 45 | return uri.Contains("microsoft-edge:?") && uri.Contains("&url="); 46 | } 47 | 48 | static string GetURIFromCortanaLink(string uri) 49 | { 50 | NameValueCollection queryCollection = HttpUtility.ParseQueryString(uri); 51 | return queryCollection["url"]; 52 | } 53 | 54 | static string RewriteMsEdgeUriSchema(string uri) 55 | { 56 | string msedge_protocol_pattern = "^microsoft-edge:/*"; 57 | 58 | Regex rgx = new Regex(msedge_protocol_pattern); 59 | string new_uri = rgx.Replace(uri, string.Empty); 60 | 61 | if (IsHttpUri(new_uri)) 62 | { 63 | return new_uri; 64 | } 65 | 66 | // May be new-style Cortana URI - try and split out 67 | if (IsNonAuthoritativeWithUrlQueryParameter(uri)) 68 | { 69 | string cortanaUri = GetURIFromCortanaLink(uri); 70 | if (IsHttpUri(cortanaUri)) 71 | { 72 | // Correctly form the new URI before returning 73 | return cortanaUri; 74 | } 75 | } 76 | 77 | // defer fallback to web browser 78 | return "http://" + new_uri; 79 | } 80 | 81 | static void OpenUri(string uri) 82 | { 83 | if (!IsUri(uri) || !IsHttpUri(uri)) 84 | { 85 | Environment.Exit(1); 86 | } 87 | 88 | ProcessStartInfo launcher = new ProcessStartInfo(uri) 89 | { 90 | UseShellExecute = true 91 | }; 92 | Process.Start(launcher); 93 | } 94 | 95 | static void Main(string[] args) 96 | { 97 | // Assume argument is URI 98 | if (args.Length == 1 && IsMsEdgeUri(args[0])) 99 | { 100 | string uri = RewriteMsEdgeUriSchema(args[0]); 101 | OpenUri(uri); 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /EdgeDeflector/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EdgeDeflector")] 8 | [assembly: AssemblyDescription("Open MICROSOFT-EDGE:// links in your default web browser.")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("EdgeDeflector")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("64e191bc-e8ce-4190-939e-c77a75aa0e28")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Maintenance Number 29 | // Build Number 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.2.3.0")] 35 | [assembly: AssemblyFileVersion("1.2.3.0")] 36 | -------------------------------------------------------------------------------- /EdgeDeflector/resources/nsis_installer.nsi: -------------------------------------------------------------------------------- 1 | Unicode true 2 | ; UTF-8 BOM! 3 | 4 | RequestExecutionLevel user 5 | 6 | ; Installer for EdgeDeflector 7 | 8 | BrandingText " " 9 | 10 | !define PRODUCT "EdgeDeflector" 11 | !define DESCRIPTION "Open MICROSOFT-EDGE:// links in your default web browser." 12 | 13 | !getdllversion "..\bin\Release\${PRODUCT}.exe" VERSION_ 14 | 15 | VIAddVersionKey "ProductName" "${PRODUCT} Installer" 16 | VIAddVersionKey "FileVersion" "${VERSION_1}.${VERSION_2}.${VERSION_3}.${VERSION_4}" 17 | VIAddVersionKey "FileDescription" "Install ${PRODUCT} ${VERSION_1}.${VERSION_2}.${VERSION_3}.${VERSION_4}." 18 | VIAddVersionKey "LegalCopyright" "Copyright © 2021" 19 | 20 | VIFileVersion "${VERSION_1}.${VERSION_2}.${VERSION_3}.${VERSION_4}" 21 | VIProductVersion "${VERSION_1}.${VERSION_2}.${VERSION_3}.${VERSION_4}" 22 | 23 | Name "${PRODUCT} Installer" 24 | 25 | OutFile "..\bin\Release\${PRODUCT}_install.exe" 26 | 27 | ; Default installation directory 28 | InstallDir $LOCALAPPDATA\Programs\${PRODUCT} 29 | 30 | ; Store install dir in the registry 31 | InstallDirRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" "Path" 32 | 33 | 34 | ; Installer pages 35 | Page directory 36 | Page instfiles 37 | 38 | ; Uninstaller pages 39 | UninstPage uninstConfirm 40 | UninstPage instfiles 41 | 42 | Section "Installer" 43 | SetAutoClose true 44 | AddSize 8 45 | 46 | ; Set output path to the installation directory. 47 | SetOutPath $INSTDIR 48 | 49 | ; Install the program 50 | File "..\bin\Release\${PRODUCT}.exe" 51 | 52 | ; Path registration 53 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" "" "$INSTDIR\${PRODUCT}.exe" 54 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" "Path" "$INSTDIR" 55 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" "SupportedProtocols" "microsoft-edge" 56 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" "useURL" 1 57 | 58 | ; Register protocol 59 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}.microsoft-edge" "" "URL: MICROSOFT-EDGE" 60 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}.microsoft-edge" "URL Protocol" "" 61 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}.microsoft-edge\shell\open\command" "" '"$INSTDIR\${PRODUCT}.exe" "%1"' 62 | 63 | ; Program class registration 64 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\Application" "ApplicationName" "${PRODUCT}" 65 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\DefaultIcon" "" "$INSTDIR\${PRODUCT}.exe,0" 66 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\shell\open\command" "" '"$INSTDIR\${PRODUCT}.exe" "%1"' 67 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\Capabilities" "ApplicationName" "${PRODUCT}" 68 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\Capabilities" "ApplicationIcon" "$INSTDIR\${PRODUCT}.exe,0" 69 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\Capabilities" "ApplicationDescription" "${DESCRIPTION}" 70 | WriteRegStr HKCU "SOFTWARE\Classes\${PRODUCT}\Capabilities\UrlAssociations" "microsoft-edge" "${PRODUCT}.microsoft-edge" 71 | 72 | ; Application registration 73 | WriteRegStr HKCU "SOFTWARE\Classes\Applications\${PRODUCT}.exe\DefaultIcon" "" "$INSTDIR\${PRODUCT}.exe,0" 74 | 75 | ; Program registration 76 | WriteRegStr HKCU "SOFTWARE\RegisteredApplications" "${PRODUCT}" "SOFTWARE\Classes\${PRODUCT}\Capabilities" 77 | 78 | ; Install the uninstaller 79 | WriteUninstaller "${PRODUCT}_uninstall.exe" 80 | 81 | ; Register the uninstaller 82 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayName" "${PRODUCT}" 83 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayIcon" "$INSTDIR\${PRODUCT}.exe,0" 84 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "DisplayVersion" "${VERSION_1}.${VERSION_2}.${VERSION_3}.${VERSION_4}" 85 | 86 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "InstallLocation" "$INSTDIR" 87 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "UninstallString" "$INSTDIR\${PRODUCT}_uninstall.exe" 88 | 89 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "NoModify" 1 90 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "NoRepair" 1 91 | 92 | ; Estimated installation size 93 | SectionGetSize 0 $0 94 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" "EstimatedSize" $0 95 | SectionEnd 96 | 97 | Function .onInstSuccess 98 | ; Open manual installation steps 99 | ExecShell "open" "microsoft-edge:https://www.daniel.priv.no/tools/edgedeflector/post-install.html" 100 | FunctionEnd 101 | 102 | ;-------------------------------- 103 | 104 | 105 | Section "Uninstall" 106 | ; Remove program 107 | Delete "$INSTDIR\${PRODUCT}.exe" 108 | 109 | ; Remove registry keys 110 | DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT}.exe" 111 | DeleteRegKey HKCU "SOFTWARE\Classes\${PRODUCT}" 112 | DeleteRegKey HKCU "SOFTWARE\Classes\${PRODUCT}.microsoft-edge" 113 | DeleteRegKey HKCU "SOFTWARE\Classes\Applications\${PRODUCT}.exe" 114 | DeleteRegValue HKCU "SOFTWARE\RegisteredApplications" "${PRODUCT}" 115 | 116 | ; Remove uninstaller 117 | DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" 118 | Delete "$INSTDIR\${PRODUCT}_uninstall.exe" 119 | 120 | RMDir "$INSTDIR" 121 | SectionEnd 122 | -------------------------------------------------------------------------------- /EdgeDeflector/resources/test-links.txt: -------------------------------------------------------------------------------- 1 | microsoft-edge:https://www.example.com/ 2 | microsoft-edge://https://www.example.com/ 3 | microsoft-edge:https://www.example.com/?url=https%3A%2F%2Fwww.example.net%2F 4 | microsoft-edge:?launchContext1=Microsoft.Windows.Cortana_cw5n1h2txyewy&url=https%3A%2F%2Fwww.example.com%2F 5 | microsoft-edge://?launchContext1=Microsoft.Windows.Cortana_cw5n1h2txyewy&url=https%3A%2F%2Fwww.example.com%2%3Furl%3Dhttps%253A%252F%252Fwww.example.net%252F 6 | microsoft-edge:?launchContext1=TimelineActivityId&launchContext2=5a1c4c0f-0f36-4942-8612-ba551bee378a&url=https%3A%2F%2Fwww.example.com%2F 7 | microsoft-edge:https://www.example.com/?url=https%3A%2F%2Fwww.example.net%2F 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright © 2017–2021 Daniel Aleksandersen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🛑 **Discontinued** because [Microsoft sabotaged the project](https://www.ctrl.blog/entry/microsoft-edge-protocol-competition.html). 2 | 3 | # EdgeDeflector 4 | 5 | *EdgeDeflector* was a small helper application that intercepted URIs that force-open web links in Microsoft Edge and redirected it to the system’s default web browser. This allowed you to use Windows features like the Cortana assistant and built-in help links with the browser of your choice instead of being forced to use Microsoft Edge. With EdgeDeflector, you were free to use Firefox, Google Chrome, or whatever your favorite web browser might be! 6 | 7 | You’ll never see EdgeDeflector ever again after installing it. It does its thing transparently in the background and only runs when a link needs to be deflected away from Microsoft Edge. 8 | 9 | System requirements: Windows 10/11, and your favorite web browser. 10 | 11 | Read more about [how EdgeDeflector works](https://www.ctrl.blog/entry/edgedeflector-default-browser.html) and why it was created. 12 | 13 | # Installation 14 | 15 | 1. **Download** the latest version of EdgeDeflector from [GitHub releases](https://github.com/da2x/EdgeDeflector/releases) 16 | 2. Run the installer. 17 | 3. The installer will open a page that guides you through some manual installation steps. 18 | 19 | You may need to **repeat the above steps after installing major feature updates to Windows** through Windows Update. 20 | 21 | You don’t need to specify your browser of choice in EdgeDeflector. It will pick up on the system configured default from Windows Settings app: Apps: Default apps: Web browser. 22 | 23 | # FAQ 24 | 25 | ## It isn’t working! 26 | 27 | Please reinstall and [follow the instructions](https://www.daniel.priv.no/tools/edgedeflector/post-install.html) shown after the installer has finished. 28 | 29 | ## Will searches inside Cortana still use Bing? 30 | 31 | Yes. EdgeDeflector doesn’t interfere with either Cortana or the Windows shell in any way. All that EdgeDeflector does is intercept links as you open them in order to rewrite them to open with your preferred web browser. 32 | 33 | ## “Intercepting links” sounds like it would affect my privacy? 34 | 35 | Yes it does, but no. Everything is done on your local computer. EdgeDeflector rewrites links which are forced by the Windows shell to open inside Microsoft Edge to open using your default web browser instead. No data is collected about you nor even stored on your local computer. 36 | 37 | ## Will EdgeDeflector redirect Bing searches to Google? 38 | 39 | [No.](https://github.com/da2x/EdgeDeflector/wiki/Not-replacing-your-search-engine) You can use an extension in your favorite web browser to achieve this. 40 | 41 | ## How do I uninstall EdgeDeflector? 42 | 43 | From Add and Remove Programs in the Windows Settings app. 44 | --------------------------------------------------------------------------------