question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Brave to Handle Searches from Windows Shell and Cortana

See original GitHub issue

Description

Even when Brave is the default browser, the user may still find themselves unintentionally using Microsoft Edge. This is because searches from the start menu and elsewhere in Windows open results in Microsoft Edge, rather than in the user’s preferred browser.

Steps to Reproduce

  1. Set Brave as your default browser on Windows 10
  2. Press the Windows Key
  3. Type “brave deviations from chromium”
  4. Press Enter

Actual result:

Results are opened in Microsoft Edge.

Expected result:

Results are opened in Brave (if Brave is the default browser).

Reproduces how often:

Always.

Brave version (brave://version info)

1.19.88

Miscellaneous Information:

Note: The “Command” portion is caused by Windows thinking “deviations from chromium” should be passed as arguments to the “brave” executable. As such, selecting that option opens 3 new tabs in Brave (i.e. /deviations, /from, /chromium), which is clearly not the intended result, and is wholly unrelated to this issue 😃

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simonhongcommented, Aug 19, 2021

When brave is set as a default app for microsoft-edge protocol via control panel , image

additional command line args are passed like below. Brave browser needs to fetch url and load it.

microsoft-edge:?launchContext1=Microsoft.Windows.Cortana_cw5n1h2txyewy&url=https%3A%2F%2Fwww.bing.com%2Fsearch%3Fq%3Dtest%26form%3DWNSGPH%26qs%3DSW%26cvid%3D935e77bf08484a92a230ddb119a8e594%26pq%3Dtest%26cc%3DKR%26setlang%3Den-US%26nclid%3D9896661371B25E91DFE2753D62351D4A%26ts%3D1629177294875%26nclidts%3D1629177294%26tsms%3D875%26wsso%3DModerate

another example - uninstall survey from chrome

microsoft-edge:https://support.google.com/chrome?p=chrome_uninstall_survey&crversion=94.0.4603.0&os=10.0.19041

Below is full command line when brave is launched via windows search panel.

"C:\Program Files\BraveSoftware\Brave-Browser-Nightly\Application\brave.exe" --enable-dom-distiller --disable-domain-reliability --no-pings --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --enable-features=LegacyTLSEnforced,WebUIDarkMode,PrefetchPrivacyChanges,PasswordImport,ReducedReferrerGranularity,AutoupgradeMixedContent,SafetyTip,WinrtGeolocationImplementation --disable-features=AutofillEnableAccountWalletStorage,FledgeInterestGroupAPI,HandwritingRecognitionWebPlatformApi,TrustTokens,DirectSockets,HandwritingRecognitionWebPlatformApiFinch,FlocIdComputedEventLogging,SignedExchangePrefetchCacheForNavigations,NetworkTimeServiceQuerying,SubresourceWebBundles,InterestCohortAPIOriginTrial,FirstPartySets,FederatedLearningOfCohorts,PrivacySandboxSettings,FledgeInterestGroups,InterestCohortFeaturePolicy,NotificationTriggers,WebOTP,AutofillServerCommunication,LiveCaption,LangClientHintHeader,IdleDetection,SignedExchangeSubresourcePrefetch,EnablePasswordsAccountStorage,TextFragmentAnchor,EnableProfilePickerOnStartup --flag-switches-begin --enable-features=LegacyTLSEnforced,WebUIDarkMode,PrefetchPrivacyChanges,PasswordImport,ReducedReferrerGranularity,AutoupgradeMixedContent,SafetyTip,WinrtGeolocationImplementation,Sidebar --flag-switches-end microsoft-edge:?launchContext1=Microsoft.Windows.Cortana_cw5n1h2txyewy&url=https%3A%2F%2Fwww.bing.com%2Fsearch%3Fq%3Dtest%26form%3DWNSGPH%26qs%3DSW%26cvid%3D935e77bf08484a92a230ddb119a8e594%26pq%3Dtest%26cc%3DKR%26setlang%3Den-US%26nclid%3D9896661371B25E91DFE2753D62351D4A%26ts%3D1629177294875%26nclidts%3D1629177294%26tsms%3D875%26wsso%3DModerate

To make Brave as a microsoft-edge protocol suported app, Brave should have microsoft-edge entry in URLAssociations like below. image


When Brave is set a a default app for microsoft-edge, registry is set like below. image


When I try to set default app for microsoft-edge protocol manually w/o using control panel, it doesn’t work. I can set reg value but it’s reverted to edge by Windows OS. I think we should launch control panel for setting this like we do for default browser app.


When Brave is set as a default app for microsoft-edge protocol, we just need to delete regstry UserChoice value for this protocol while uninstalling Brave. Then, edge will be set implicitely. When Brave is set as a default app for microsoft-edge protocol, we don’t need to do anything during the uninstall. When uninstalled app is still set as a default app for microsoft-edge, Windows will ask again to users to choose default app for it.

1reaction
bscliftoncommented, Mar 12, 2021

This would be a great one to do- we’d need to make it an option (under System maybe?) in settings defaulted to false. When toggled, it could update the registry. The hardest part would be the parsing of the microsoft-edge: if we didn’t consider using an existing library (like EdgeDeflector)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage Cortana settings in Windows 10 - Microsoft Support
To hide Cortana in Windows 10, November 2019 Update and earlier versions: On the taskbar, select Cortana, hover over Cortana on the menu,...
Read more >
Continuing the discussion from Some of your questions ...
Question #16 Will Brave ever go away from Chromium and develop its own browser? Answer No intent to ever get away from Chromium...
Read more >
Brave and Firefox to intercept links that force-open in Microsoft ...
Brave and Firefox implement support for the microsoft-edge: URL scheme. Brave to hijack Bing search links. Plus, the history of all this ...
Read more >
How to Disable Microsoft's Cortana - Endurtech
Disable Cortana in Windows 10 Home ... Right click on the “Windows” directory and choose “New > Key” (folder). Enter “Windows Search“. Select...
Read more >
How to Set Windows 11 Search to Google Search and Chrome
3. This will redirect to Chrometana Pro Setting. Here click on Cortana and Bing and set it to Cortana. Or else, it will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found