Fix default values if not existing.

pull/722/head
Romain 2024-09-30 22:02:20 +02:00
parent 661a7ef347
commit 5daa32c19d
1 changed files with 2 additions and 2 deletions

View File

@ -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