From 5daa32c19da9a432677421dff19a03322882d070 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:02:20 +0200 Subject: [PATCH] Fix default values if not existing. --- Sources/Winget-AutoUpdate/functions/Update-WAU.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Winget-AutoUpdate/functions/Update-WAU.ps1 b/Sources/Winget-AutoUpdate/functions/Update-WAU.ps1 index a0e5fbd..b22504a 100644 --- a/Sources/Winget-AutoUpdate/functions/Update-WAU.ps1 +++ b/Sources/Winget-AutoUpdate/functions/Update-WAU.ps1 @@ -30,8 +30,8 @@ function Update-WAU { Write-ToLog "New registry key created." } #Create missing default values - Set-ItemProperty -Path $destinationPath -Name "WAU_DoNotRunOnMetered" -Value 1 -Type Dword - Write-ToLog "WAU_DoNotRunOnMetered created. Value: 1" + Set-ItemProperty -Path $destinationPath -Name "WAU_DoNotRunOnMetered" -Value 0 -Type Dword + Write-ToLog "WAU_DoNotRunOnMetered created. Value: 0" Set-ItemProperty -Path $destinationPath -Name "WAU_UpdatesAtLogon" -Value 0 -Type Dword Write-ToLog "WAU_UpdatesAtLogon created. Value 0" #Retrieve the properties of the source key