Skip to content

Search guides, tweaks, features, and FAQs.

Code ReferenceTweaks Referencez--Advanced-Tweaks---CAUTION

Microsoft Edge - Remove

config/tweaks.json
"WPFTweaksRemoveEdge": {
"Content": "Microsoft Edge - Remove",
"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",
"panel": "1",
"InvokeScript": [
"
$EdgeAppDir = \"$Env:ProgramFiles (x86)\\Microsoft\\Edge\\Application\"
$Path = $null
if (Test-Path -LiteralPath $EdgeAppDir -ErrorAction Stop) {
$InstallerPattern = Join-Path $EdgeAppDir \"*\\Installer\\setup.exe\"
if (Test-Path -Path $InstallerPattern -ErrorAction Stop) {
$Path = Resolve-Path -Path $InstallerPattern -ErrorAction Stop | Select-Object -Last 1
}
}
if ($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": [
"
Write-Host \"Installing Microsoft Edge...\"
winget install Microsoft.Edge --source winget
"
],
}