Update Invoke-WinUtilRemoveEdge.ps1 (#4358)

* Replce Get-ChildItem with Resolve-Path inside of Invoke-WinUtilRemoveEdge.ps1

* Update Invoke-WinUtilRemoveEdge.ps1

* Update Invoke-WinUtilRemoveEdge.ps1
This commit is contained in:
Gabi
2026-04-14 19:03:07 +03:00
committed by GitHub
parent 8378fd5377
commit 8e2dc21823

View File

@@ -1,7 +1,7 @@
function Invoke-WinUtilRemoveEdge {
$Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1
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