Merge pull request #430 from Romanitho/fix-gpo

Fix registry modifications
pull/432/head
Romain 2023-10-17 21:27:42 +02:00 committed by GitHub
commit 6dae17c2fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -199,10 +199,10 @@ function Invoke-PostUpdateActions {
### End of post update actions ###
#Reset WAU_UpdatePostActions Value
$WAUConfig | New-ItemProperty -Name WAU_PostUpdateActions -Value 0 -Force | Out-Null
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" -Name "WAU_PostUpdateActions" -Value 0 -Force | Out-Null
#Get updated WAU Config
$Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
$Script:WAUConfig = Get-WAUConfig
#log
Write-ToLog "Post Update actions finished" "green"

View File

@ -41,10 +41,10 @@ function Update-WAU {
Remove-Item -Path $location -Recurse -Force -ErrorAction SilentlyContinue
#Set new version to registry
$WAUConfig | New-ItemProperty -Name DisplayVersion -Value $WAUAvailableVersion -Force | Out-Null
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" -Name "DisplayVersion" -Value $WAUAvailableVersion -Force | Out-Null
#Set Post Update actions to 1
$WAUConfig | New-ItemProperty -Name WAU_PostUpdateActions -Value 1 -Force | Out-Null
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" -Name "WAU_PostUpdateActions" -Value 1 -Force | Out-Null
#Send success Notif
Write-ToLog "WAU Update completed." "Green"