-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edge removal improvements #2540
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had problems even with the force. I think we might have to download the EXE directly and set it up that way or use chocolatey as a backup.
Need to expand the remove item property to strip out any Edge Policies if they exist.
1edf033
to
1945fe2
Compare
- change uninstall function call - remove winget install code - add edge install function call - remove reg keys causing cursed open with contect menu - remove edge policy keys - remove edge keys - remove edgeupdate keys - add install edg logics
I've personally uninstalled Edge using method in a fresh windows 24H2 install and I was able to uninstall it with all the files removed from fs as well as registry. Check the log at You can get a detailed view of what's getting added extra apart from the base installation files from the log of a clean install of windows which has Edge Pre-Installed. You can also get a detailed view of what's getting removed from the log of a clean uninstall using the setup. (a vm with EEA countries). NOTE: don't delete keys that have a name edge on it blindly. look for the dependencies and clean it properly. PS: I might raise a PR with my whole script (wip - needs spare time) to wipe edge in whatever state without the help of its setup. |
I had this planned for the micro-win stream. But @ChrisTitusTech didn't make it 😒 function Remove-Edge {
Write-Host "$([char]0x1b)[48;2;20;14;136m=== Removing Microsoft Edge"
reg load "HKLM\zSOFTWARE" "$mountDir\Windows\System32\config\SOFTWARE" | Out-Null
reg load "HKLM\zSYSTEM" "$mountDir\Windows\System32\config\SYSTEM" | Out-Null
reg load "HKLM\zNTUSER" "$mountDir\Users\Default\ntuser.dat" | Out-Null
# Microsoft Edge
reg delete "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f | Out-Null
if (Test-Path "$mountDir\Program Files (x86)\Microsoft\Edge" -Type Container) {
Remove-Item "$mountDir\Program Files (x86)\Microsoft\Edge" -Recurse -Force | Out-Null
}
# Extra
reg delete "HKLM\zSOFTWARE\Microsoft\MicrosoftEdge" /f | Out-Null
# Microsoft EdgeWebView
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\ClientState\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f | Out-Null
if (Test-Path "$mountDir\Program Files (x86)\Microsoft\EdgeWebView" -Type Container) {
Remove-Item "$mountDir\Program Files (x86)\Microsoft\EdgeWebView" -Recurse -Force | Out-Null
}
# Edge Core
if (Test-Path "$mountDir\Program Files (x86)\Microsoft\EdgeCore" -Type Container) {
Remove-Item "$mountDir\Program Files (x86)\Microsoft\EdgeCore" -Recurse -Force | Out-Null
}
# Microsoft Edge Update
reg delete "HKLM\zSOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MicrosoftEdgeUpdate.exe" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate" /f | Out-Null
reg delete "HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f | Out-Null
# Microsoft Edge Update :: Services
reg delete "HKLM\zSYSTEM\ControlSet001\Services\edgeupdate" /f | Out-Null
reg delete "HKLM\zSYSTEM\ControlSet001\Services\edgeupdatem" /f | Out-Null
if (Test-Path "$mountDir\Program Files (x86)\Microsoft\EdgeUpdate" -Type Container) {
Remove-Item "$mountDir\Program Files (x86)\Microsoft\EdgeUpdate" -Recurse -Force | Out-Null
}
# Prevent EdgeChromium from Installing in the future
reg add "HKLM\zSOFTWARE\Microsoft\EdgeUpdate" /v "DoNotUpdateToEdgeWithChromium" /t REG_DWORD /d "1" /f | Out-Null
reg unload "HKLM\zSOFTWARE" | Out-Null
reg unload "HKLM\zSYSTEM" | Out-Null
reg unload "HKLM\zNTUSER" | Out-Null
Write-Host
} Here is a function that removes edge from an offline windows image. When on first boot edge sets up extra stuff like shortcuts, assocs, etc (which you can find the details in the log) SideNote: EdgeUpdate is like the host app, where Edge and WebView are their clients which it makes up-to-date |
Isn't edge core also a compatibility layer for webview? |
It's a shared components used by both edge and webview. (Mostly webview). |
Also, EdgeUpdate might not uninstall if EdgeWebview is still installed in some cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, that will fix a lot of edge user issue on reinstall doing it this method as well.
Pull Request
Edge removal improvements
Type of Change
Description
Testing
changes were tested on vm, run & undo work without sys/ep restart needed
Checklist