2022-03-22 13:39:01 +00:00
|
|
|
function Get-WAUUpdateStatus{
|
2022-03-26 15:02:00 +00:00
|
|
|
|
2022-03-22 13:39:01 +00:00
|
|
|
[xml]$UpdateStatus = Get-Content "$WorkingDir\config\config.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
2022-03-26 15:02:00 +00:00
|
|
|
|
|
|
|
#Check if AutoUpdate is enabled
|
2022-03-26 21:27:11 +00:00
|
|
|
if ($true -eq [System.Convert]::ToBoolean($UpdateStatus.app.WAUautoupdate)){
|
|
|
|
Write-Log "WAU AutoUpdate is enabled" "Green"
|
2022-03-26 15:02:00 +00:00
|
|
|
$Script:WAUautoupdate = $true
|
|
|
|
|
|
|
|
#Check if pre-release versions are enabled
|
2022-03-26 21:27:11 +00:00
|
|
|
if ($true -eq [System.Convert]::ToBoolean($UpdateStatus.app.WAUprerelease)){
|
2022-03-26 15:02:00 +00:00
|
|
|
Write-Log "WAU AutoUpdate Pre-release enabled" "Cyan"
|
|
|
|
$Script:WAUprerelease = $true
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$Script:WAUprerelease = $false
|
|
|
|
}
|
2022-03-22 13:39:01 +00:00
|
|
|
}
|
|
|
|
else{
|
|
|
|
Write-Log "WAU AutoUpdate is Disabled" "Grey"
|
2022-03-26 15:02:00 +00:00
|
|
|
$Script:WAUautoupdate = $false
|
2022-03-22 13:39:01 +00:00
|
|
|
}
|
|
|
|
}
|