Fix registry modifications
parent
198de7152e
commit
ad38e3d18b
|
@ -199,10 +199,10 @@ function Invoke-PostUpdateActions {
|
||||||
### End of post update actions ###
|
### End of post update actions ###
|
||||||
|
|
||||||
#Reset WAU_UpdatePostActions Value
|
#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
|
#Get updated WAU Config
|
||||||
$Script:WAUConfig = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
|
$Script:WAUConfig = Get-WAUConfig
|
||||||
|
|
||||||
#log
|
#log
|
||||||
Write-ToLog "Post Update actions finished" "green"
|
Write-ToLog "Post Update actions finished" "green"
|
||||||
|
|
|
@ -41,10 +41,10 @@ function Update-WAU {
|
||||||
Remove-Item -Path $location -Recurse -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $location -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
#Set new version to registry
|
#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
|
#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
|
#Send success Notif
|
||||||
Write-ToLog "WAU Update completed." "Green"
|
Write-ToLog "WAU Update completed." "Green"
|
||||||
|
|
Loading…
Reference in New Issue