Handle small errors better

pull/424/head
Fabian Seitz 2023-10-16 09:15:03 +02:00
parent 783da32edc
commit ba75392800
1 changed files with 4 additions and 2 deletions

View File

@ -488,7 +488,7 @@ function Install-WingetAutoUpdate {
Start-WingetAutoUpdate
}
catch {
Write-host "WAU Installation failed! Run me with admin rights" -ForegroundColor Red
Write-host "WAU Installation failed! Error $_ - Try running me with admin rights" -ForegroundColor Red
Start-sleep 1
return $False
}
@ -634,6 +634,8 @@ else {
Uninstall-WingetAutoUpdate
}
Remove-Item "$WingetUpdatePath\Version.txt" -Force
if (Test-Path "$WingetUpdatePath\Version.txt") {
Remove-Item "$WingetUpdatePath\Version.txt" -Force
}
Write-host "`nEnd of process." -ForegroundColor Cyan
Start-Sleep 3