update edge uninstall (#4666)

* yep

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json
This commit is contained in:
Gabi
2026-06-29 10:33:31 -05:00
committed by GitHub
parent 8b6098b36a
commit 5003f14e0a
2 changed files with 13 additions and 11 deletions
+13 -3
View File
@@ -586,15 +586,25 @@
}, },
"WPFTweaksRemoveEdge": { "WPFTweaksRemoveEdge": {
"Content": "Microsoft Edge - Remove", "Content": "Microsoft Edge - Remove",
"Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.", "Description": "Uninstalls Microsoft Edge by creating dummy MicrosoftEdge.exe file in the legacy Edge folder. This tricks Windows into unlocking the official Edge uninstaller allowing for a system-level removal.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"InvokeScript": [ "InvokeScript": [
"Invoke-WinUtilRemoveEdge" "
$Path = Resolve-Path -Path \"$Env:ProgramFiles (x86)\\Microsoft\\Edge\\Application\\*\\Installer\\setup.exe\" | Select-Object -Last 1
if (Test-Path $Path) {
New-Item -Path \"$Env:SystemRoot\\SystemApps\\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\\MicrosoftEdge.exe\" -Force
Start-Process -FilePath $Path -ArgumentList \"--uninstall --system-level --force-uninstall --delete-profile\" -Wait
Write-Host \"Microsoft Edge was removed\"
} else {
Write-Host \"Microsoft Edge is not installed\"
}
"
], ],
"UndoScript": [ "UndoScript": [
" "
Write-Host 'Installing Microsoft Edge...' Write-Host \"Installing Microsoft Edge...\"
winget install Microsoft.Edge --source winget winget install Microsoft.Edge --source winget
" "
], ],
@@ -1,8 +0,0 @@
function Invoke-WinUtilRemoveEdge {
New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
$Path = Resolve-Path -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -Last 1
Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait
Write-Host "Microsoft Edge was removed" -ForegroundColor Green
}