Skip to content

Instantly share code, notes, and snippets.

@stash
Last active August 19, 2018 01:51
Show Gist options
  • Save stash/ccb1ff2de555dda1b0bd73ff54ba9263 to your computer and use it in GitHub Desktop.
Save stash/ccb1ff2de555dda1b0bd73ff54ba9263 to your computer and use it in GitHub Desktop.
Routing around Cortana and Edge on Windows 10

I really enjoy being able to use the windows key to open applications and control panels in Windows 8.1. These settings bring it back to about the same sort of behaviour.

This is an open work-in-progress and might mess up your install!

The below is valid for Windows 10 v1803, roughly August 2018.

Create a system restore point before doing this, just in case. ;)

1. Configure Cortana in Settings

Vaguely: I disabled most of the options, except "activity history", but you may wish to disable that too. Speech recognition is turned off since I don't normally use a mic, so I may have missed some other setting if you have that enabled.

2. Windows Firewall

2a. Backup firewall settings

Either Open WIndows Defender Firewall and click Export..., or In an elevated shell, run netsh advfirewall export C:\firewall-settings-backup.wfw

(If you need to undo the changes, exchange export for import)

2b. Block Cortana

  1. Open Windows Defender Firewall
  2. Click on "Inbound Rules", double click on the Cortana rule, change "Action" to "Block the Connection"
  3. Repeat under "Outbound Rules"

or, with an administrator PowerShell:

Get-NetFirewallRule -DisplayName '*Cortana*' | Set-NetFirewallRule -Profile Any -Action Block

Double check that this worked with:

Get-NetFirewallRule -DisplayName '*Cortana*'

which should display something like

Name                  : {6B80597B-69B0-4A16-815B-9374C7BA22AF}
DisplayName           : Cortana
Description           : Search the web and Windows
DisplayGroup          : Cortana
Group                 : @{Microsoft.Windows.Cortana_1.10.7.17134_neutral_neutral_cw5n1h2txyewy?ms-resource://Microsoft.
                        Windows.Cortana/resources/PackageDisplayName}
Enabled               : True
Profile               : Any
Platform              : {6.2+}
Direction             : Outbound
Action                : Block
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 : <<SID>>
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local

Name                  : {BA8F16DE-9468-4C59-BBAC-5F09F2AAF931}
DisplayName           : Cortana
Description           : Search the web and Windows
DisplayGroup          : Cortana
Group                 : @{Microsoft.Windows.Cortana_1.10.7.17134_neutral_neutral_cw5n1h2txyewy?ms-resource://Microsoft.
                        Windows.Cortana/resources/PackageDisplayName}
Enabled               : True
Profile               : Any
Platform              : {6.2+}
Direction             : Inbound
Action                : Block
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 : <<SID>>
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local

Bonus points if you can tell me how to run that at startup.

3. Install Edge Deflector

Edge Deflector will ensure that hard-coded links for Edge go to your default browser instead.

  1. Go to the Releases tab on https://github.com/da2x/EdgeDeflector
  2. Install it.
  3. You can verify that it's working by going to Settings > Apps > Default Apps, scrolling to the bottom and clicking Choose default apps by protocol and checking that microsoft-edge is set to EdgeDeflector.

4. Redirector plugin to change Bing to your preferred search engine.

If you've followed up to this point, hitting the windows key and typing stuff won't send the text to Bing, but it will still show a single "search suggestion". I wanted this to not go to Bing but to Duck Duck Go instead.

  1. Go to http://einaregilsson.com/redirector/
  2. Install Redirector plugin in your browser
  3. import the rule below (change duckduckgo to the search engine of your choice)
{
"createdBy": "Redirector v3.1.1",
"createdAt": "2018-08-06T21:34:46.389Z",
"redirects": [
{
"description": "Bing to DDG",
"exampleUrl": "https://www.bing.com/search?q=never+gonna+give+you+up&form=WNSGPH",
"exampleResult": "https://duckduckgo.com/?q=never+gonna+give+you+up",
"error": null,
"includePattern": "https://www.bing.com/search\\?q=([^&]+)",
"excludePattern": "",
"redirectUrl": "https://duckduckgo.com/?q=$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"appliesTo": [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"object",
"xmlhttprequest",
"other"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment