Maybe som optimizations/millisecs...
parent
fa1004f4b7
commit
e5bc0b663c
|
@ -51,7 +51,8 @@ if (Test-Network) {
|
|||
Write-Log "WAU current version: $WAUCurrentVersion"
|
||||
#Check if WAU update feature is enabled or not
|
||||
$WAUDisableAutoUpdate = $WAUConfig.WAU_DisableAutoUpdate
|
||||
#If yes then check WAU update
|
||||
#If yes then check WAU update if System
|
||||
if ($IsSystem) {
|
||||
if ($WAUDisableAutoUpdate -eq 1) {
|
||||
Write-Log "WAU AutoUpdate is Disabled." "Grey"
|
||||
}
|
||||
|
@ -63,17 +64,13 @@ if (Test-Network) {
|
|||
if ([version]$WAUAvailableVersion -gt [version]$WAUCurrentVersion) {
|
||||
#If new version is available, update it
|
||||
Write-Log "WAU Available version: $WAUAvailableVersion" "Yellow"
|
||||
if ($IsSystem) {
|
||||
Update-WAU
|
||||
}
|
||||
else {
|
||||
Write-Log "WAU Needs to run as system to update" "Yellow"
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Log "WAU is up to date." "Green"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($IsSystem) {
|
||||
#Get External ListPath
|
||||
|
@ -169,7 +166,6 @@ if (Test-Network) {
|
|||
Write-Log "No new update." "Green"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Run WAU in user context if currently as system
|
||||
if ($IsSystem) {
|
||||
|
@ -188,6 +184,7 @@ if ($IsSystem) {
|
|||
Write-Log "User context execution not installed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#End
|
||||
Write-Log "End of process!" "Cyan"
|
||||
|
|
Loading…
Reference in New Issue