Clean useless registry keys and add Out-Null

pull/428/head
romanitho 2023-10-17 11:23:42 +02:00
parent 21cc2c8b78
commit 034d4c2759
1 changed files with 2 additions and 4 deletions

View File

@ -41,12 +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 $WAUConfig | New-ItemProperty -Name DisplayVersion -Value $WAUAvailableVersion -Force | Out-Null
$WAUConfig | New-ItemProperty -Name VersionMajor -Value ([version]$WAUAvailableVersion.Replace("-", ".")).Major -Force
$WAUConfig | New-ItemProperty -Name VersionMinor -Value ([version]$WAUAvailableVersion.Replace("-", ".")).Minor -Force
#Set Post Update actions to 1 #Set Post Update actions to 1
$WAUConfig | New-ItemProperty -Name WAU_PostUpdateActions -Value 1 -Force $WAUConfig | New-ItemProperty -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"