Handle small errors better
parent
783da32edc
commit
ba75392800
|
@ -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
|
||||
}
|
||||
|
||||
if (Test-Path "$WingetUpdatePath\Version.txt") {
|
||||
Remove-Item "$WingetUpdatePath\Version.txt" -Force
|
||||
}
|
||||
Write-host "`nEnd of process." -ForegroundColor Cyan
|
||||
Start-Sleep 3
|
||||
|
|
Loading…
Reference in New Issue