From 6b961ce22e6204e4f59e9265ca703db4189c205f Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 4 Aug 2022 22:12:43 +0200 Subject: [PATCH] Name instead of ID... --- Winget-AutoUpdate/functions/Update-App.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Winget-AutoUpdate/functions/Update-App.ps1 b/Winget-AutoUpdate/functions/Update-App.ps1 index bd1eea0..4a9c769 100644 --- a/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Winget-AutoUpdate/functions/Update-App.ps1 @@ -32,14 +32,14 @@ Function Update-App ($app) { #Test for a Pending Reboot (Component Based Servicing/WindowsUpdate/CCM_ClientUtilities) $PendingReboot = Test-PendingReboot if ($PendingReboot -eq $true) { - Write-Log "A Pending Reboot lingers and probably prohibited $($app.Id) from upgrading..." "Red" - Write-Log "...an install for $($app.Id) is NOT executed!" "Red" + Write-Log "A Pending Reboot lingers and probably prohibited $($app.Name) from upgrading..." "Red" + Write-Log "...an install for $($app.Name) is NOT executed!" "Red" $FailedToUpgrade = $true break } #If app failed to upgrade, run Install command - Write-Log "An upgrade for $($app.Id) failed, now trying an install..." "Yellow" + Write-Log "An upgrade for $($app.Name) failed, now trying an install..." "Yellow" & $Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements -h | Tee-Object -file $LogFile -Append #Set mods to apply as an install