From 4ae12c7ca4f951842baabea7014836ea028bd422 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 23 May 2022 00:35:33 +0200 Subject: [PATCH] missing parts --- Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 | 3 +++ Winget-AutoUpdate/winget-upgrade.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 index b82978d..c1f9fb3 100644 --- a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 +++ b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 @@ -59,4 +59,7 @@ function Invoke-PostUpdateActions { #Reset WAU_UpdatePostActions Value $WAUConfig | New-ItemProperty -Name WAU_PostUpdateActions -Value 0 -Force + #Get updated WAU Config + $Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" + } \ No newline at end of file diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 3591717..bb472fd 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -15,8 +15,8 @@ Start-Init $Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" #Run post update actions -if (!($WAUConfig.WAU_UpdatePostActions -eq 0)){ - +if (!($WAUConfig.WAU_PostUpdateActions -eq 0)){ + Invoke-PostUpdateActions } #Run Scope Machine funtion if run as system