From 0862f9ee5e9335e44cbd76b0bc2e3dfc4fdcbc6e Mon Sep 17 00:00:00 2001 From: romanitho <96626929+Romanitho@users.noreply.github.com> Date: Wed, 15 Jun 2022 13:20:42 +0200 Subject: [PATCH] Fixed notification on some upgrade cases --- Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 index 3f1f31c..2a69a2b 100644 --- a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 +++ b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 @@ -32,6 +32,14 @@ function Invoke-PostUpdateActions { #log Write-Log "-> $regPath created." "green" } + #Fix Notif where WAU_NotificationLevel is not set + $regNotif = Get-ItemProperty $regPath -Name WAU_NotificationLevel -ErrorAction SilentlyContinue + if (!$regNotif){ + New-ItemProperty $regPath -Name WAU_NotificationLevel -Value Full -Force + + #log + Write-Log "-> Notification level setting was missing. Fixed with 'Full' option." + } #Convert about.xml if exists (previous WAU versions) to reg $WAUAboutPath = "$WorkingDir\config\about.xml"