There was an error while loading. Please reload this page.
Invoke-WinUtilRemoveEdge.ps1
1 parent 8378fd5 commit 8e2dc21Copy full SHA for 8e2dc21
1 file changed
functions/public/Invoke-WinUtilRemoveEdge.ps1
@@ -1,7 +1,7 @@
1
function Invoke-WinUtilRemoveEdge {
2
- $Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1
3
-
4
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
5
Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait
6
7
Write-Host "Microsoft Edge was removed" -ForegroundColor Green
0 commit comments