Update Invoke-WinUtilRemoveEdge.ps1 (#4291)

* Update Invoke-WinUtilRemoveEdge.ps1

* Update Invoke-WinUtilRemoveEdge.ps1

* Merge branch 'ChrisTitusTech:main' into patch-12
This commit is contained in:
Gabi
2026-04-02 13:24:18 -07:00
committed by GitHub
parent 838b0c1a1b
commit 7f105a58bb

View File

@@ -1,7 +1,8 @@
function Invoke-WinUtilRemoveEdge {
Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..."
$Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1
$Path = (Get-ChildItem "C:\Program Files (x86)\Microsoft\Edge\Application\*\Installer\setup.exe")[0].FullName
New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile'
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" -ForegroundColor Green
}