mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
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:
+13
-3
@@ -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
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user