Merge pull request #424 from FaserF/main

Handle small errors better
pull/425/head
Romain 2023-10-16 10:23:12 +02:00 committed by GitHub
commit 9b45187936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -489,7 +489,7 @@ function Install-WingetAutoUpdate {
Start-WingetAutoUpdate Start-WingetAutoUpdate
} }
catch { 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 Start-sleep 1
return $False return $False
} }
@ -625,6 +625,8 @@ else {
Uninstall-WingetAutoUpdate Uninstall-WingetAutoUpdate
} }
if (Test-Path "$WingetUpdatePath\Version.txt") {
Remove-Item "$WingetUpdatePath\Version.txt" -Force Remove-Item "$WingetUpdatePath\Version.txt" -Force
}
Write-host "`nEnd of process." -ForegroundColor Cyan Write-host "`nEnd of process." -ForegroundColor Cyan
Start-Sleep 3 Start-Sleep 3