Skip to content

Commit 8e2dc21

Browse files
authored
Update Invoke-WinUtilRemoveEdge.ps1 (ChrisTitusTech#4358)
* Replce Get-ChildItem with Resolve-Path inside of Invoke-WinUtilRemoveEdge.ps1 * Update Invoke-WinUtilRemoveEdge.ps1 * Update Invoke-WinUtilRemoveEdge.ps1
1 parent 8378fd5 commit 8e2dc21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/public/Invoke-WinUtilRemoveEdge.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function Invoke-WinUtilRemoveEdge {
2-
$Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1
3-
42
New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
3+
4+
$Path = Resolve-Path -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -Last 1
55
Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait
66

77
Write-Host "Microsoft Edge was removed" -ForegroundColor Green

0 commit comments

Comments
 (0)