Skip to content

Instantly share code, notes, and snippets.

@ave9858
Last active April 26, 2024 19:06
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ave9858/c3451d9f452389ac7607c99d45edecc6 to your computer and use it in GitHub Desktop.
Save ave9858/c3451d9f452389ac7607c99d45edecc6 to your computer and use it in GitHub Desktop.

Edge Chromium

Note: If your system region is part of the EEA the option to uninstall Edge normally is rolling out in the latest updates for Windows and Edge. With some registry edits, you can change the region after install.

HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge, remove NoRemove.

HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}, delete experiment_control_labels if it exists.

Create HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev and add the AllowUninstall value. This replaces the experiment_control_labels blocker on later versions of Edge.

Run uninstall in Settings or Control Panel.

If both WebView2 and Edge Chromium are uninstalled, Microsoft Edge Update will uninstall itself.

Edge Chromium can be reinstalled from https://www.microsoft.com/en-us/edge/download.

EdgeUWP

EdgeUWP is removed in latest patch of Windows

Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\InboxApplications\Microsoft.MicrosoftEdge_x.x.x.x_neutral__8wekyb3d8bbwe (The version will vary depending on your Windows version). This will ensure EdgeUWP is not installed on new accounts.

To remove EdgeUWP on existing accounts, create a key under EndOfLife named the SID of the account that has EdgeUWP, and create a key under that named Microsoft.MicrosoftEdge_8wekyb3d8bbwe. After that, you can use Remove-AppxPackage in powershell to remove. Remove the Microsoft.MicrosoftEdge_8wekyb3d8bbwe key after (THIS STEP IS IMPORTANT, WINDOWS UPDATE WILL ERROR IF YOU DON'T!).

$ErrorActionPreference = "Stop"
$regView = [Microsoft.Win32.RegistryView]::Registry32
$microsoft = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView).
OpenSubKey('SOFTWARE\Microsoft', $true)
$edgeUWP = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
$uninstallRegKey = $microsoft.OpenSubKey('Windows\CurrentVersion\Uninstall\Microsoft Edge')
$uninstallString = $uninstallRegKey.GetValue('UninstallString') + ' --force-uninstall'
$edgeClient = $microsoft.OpenSubKey('EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}', $true)
if ($null -ne $edgeClient.GetValue('experiment_control_labels')) {
$edgeClient.DeleteValue('experiment_control_labels')
}
$microsoft.CreateSubKey('EdgeUpdateDev').SetValue('AllowUninstall', '')
[void](New-Item $edgeUWP -ItemType Directory -ErrorVariable fail -ErrorAction SilentlyContinue)
[void](New-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue)
Start-Process cmd.exe "/c $uninstallString" -WindowStyle Hidden -Wait
[void](Remove-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue)
if (-not $fail) {
[void](Remove-Item "$edgeUWP")
}
Write-Output "Edge should now be uninstalled!"
@infradragon
Copy link

DONT FORGET TO REMOVE THE MICROSOFT EDGE REGISTRY KEY AFTERWARDS OR ELSE YOU WILL WASTE MANY HOURS OF YOUR LIFE FIXING WINDOWS UPDATE!!!!!!!!!!!!

@maolop
Copy link

maolop commented Apr 5, 2023

DONT FORGET TO REMOVE THE MICROSOFT EDGE REGISTRY KEY AFTERWARDS OR ELSE YOU WILL WASTE MANY HOURS OF YOUR LIFE FIXING WINDOWS UPDATE!!!!!!!!!!!!

Please explain.

@ave9858
Copy link
Author

ave9858 commented Apr 5, 2023

Follow all steps of the guide, don't quit when edge has disappeared.

DONT FORGET TO REMOVE THE MICROSOFT EDGE REGISTRY KEY AFTERWARDS OR ELSE YOU WILL WASTE MANY HOURS OF YOUR LIFE FIXING WINDOWS UPDATE!!!!!!!!!!!!

Please explain.

@Melodeiro
Copy link

God bless you

@waqs102
Copy link

waqs102 commented Jul 10, 2023

wow it works with that strange appx-remove trick...
.md -> SOFTWARE\WOW6432Node\Microsoft
.ps1 -> SOFTWARE\Microsoft
why they differ?
thanks...

@ave9858
Copy link
Author

ave9858 commented Jul 10, 2023

wow it works with that strange appx-remove trick...
.md -> SOFTWARE\WOW6432Node\Microsoft
.ps1 -> SOFTWARE\Microsoft
why they differ?
thanks...

The script selects the 32 bit registry automatically ($regView = [Microsoft.Win32.RegistryView]::Registry32), while the guide uses regedit so you have to navigate to it manually.

@he3als
Copy link

he3als commented Jul 10, 2023

Wouldn't it also make sense to remove it with DISM (so that new users don't have the AppX)?

Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like "*Microsoft.MicrosoftEdge*" } | Remove-AppxProvisionedPackage -Online

@ave9858
Copy link
Author

ave9858 commented Jul 10, 2023

Wouldn't it also make sense to remove it with DISM?

Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like "*Microsoft.MicrosoftEdge*" } | Remove-AppxProvisionedPackage -Online

That's not necessary, and I'm not sure if it work because edge legacy is a system app, not a regular app preinstalled.

@he3als
Copy link

he3als commented Jul 10, 2023

Why would it not be necessary? It still stays as a provisioned package after you uninstall it.

vmware_CguRfYzb4a
vmware_OxfiqYSKHv

@ave9858
Copy link
Author

ave9858 commented Jul 10, 2023

Why would it not be necessary? It still stays as a provisioned package after you uninstall it.

vmware_CguRfYzb4a vmware_OxfiqYSKHv

That's not edge legacy, do you see that on the system at all with new users (outside of when you search for it in PowerShell or whatever)? That app should be removed when you uninstall Edge chromium.

@he3als
Copy link

he3als commented Jul 10, 2023

It seems like Edge uninstalled incorrectly in my VM, after re-running the script the package seems to disappear, sorry about that.

@waqs102
Copy link

waqs102 commented Aug 20, 2023

The script selects the 32 bit registry automatically ($regView = [Microsoft.Win32.RegistryView]::Registry32), while the guide uses regedit so you have to navigate to it manually.

very nice

@Laicure
Copy link

Laicure commented Sep 1, 2023

Worked flawlessly! I can even install WebView2 without Edge reinstalling!

@GeniusBroccoli
Copy link

Thanks. How to remove Edge components in C:\Program Files (x86)\Microsoft? I have here EdgeCore, EdgeUpdate, EdgeWebView. EdgeUpdate Services still running in my system.

@ave9858
Copy link
Author

ave9858 commented Apr 4, 2024

Thanks. How to remove Edge components in C:\Program Files (x86)\Microsoft? I have here EdgeCore, EdgeUpdate, EdgeWebView. EdgeUpdate Services still running in my system.

That's for Webview2, not the main edge browser. You should keep those files.

@GeniusBroccoli
Copy link

That's for Webview2, not the main edge browser. You should keep those files.

Hmm, in the EdgeCore folder I have fully worked Edge Browser 👀 This is normal?

@ave9858
Copy link
Author

ave9858 commented Apr 4, 2024

Hmm, in the EdgeCore folder I have fully worked Edge Browser 👀 This is normal?

Yes, it won't run on its own. WebView2 and edge share components and you can launch the Edge UI through that folder if you manually run it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment