parent
9f5cc6d256
commit
d90e0413fa
|
@ -233,6 +233,10 @@ function Start-WAUUpdateCheck{
|
||||||
[xml]$UpdateStatus = Get-Content "$WorkingDir\config\config.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
[xml]$UpdateStatus = Get-Content "$WorkingDir\config\config.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
||||||
$AutoUpdateStatus = $UpdateStatus.app.WAUautoupdate
|
$AutoUpdateStatus = $UpdateStatus.app.WAUautoupdate
|
||||||
|
|
||||||
|
#Get current installed version
|
||||||
|
[xml]$About = Get-Content "$WorkingDir\config\about.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
||||||
|
[version]$CurrentVersion = $About.app.version
|
||||||
|
|
||||||
#Check if AutoUpdate is enabled
|
#Check if AutoUpdate is enabled
|
||||||
if ($AutoUpdateStatus -eq $false){
|
if ($AutoUpdateStatus -eq $false){
|
||||||
Write-Log "WAU Current version: $CurrentVersion. AutoUpdate is disabled." "Cyan"
|
Write-Log "WAU Current version: $CurrentVersion. AutoUpdate is disabled." "Cyan"
|
||||||
|
@ -245,10 +249,6 @@ function Start-WAUUpdateCheck{
|
||||||
$LatestVersion = (Invoke-WebRequest $WAUurl | ConvertFrom-Json)[0].tag_name
|
$LatestVersion = (Invoke-WebRequest $WAUurl | ConvertFrom-Json)[0].tag_name
|
||||||
[version]$AvailableVersion = $LatestVersion.Replace("v","")
|
[version]$AvailableVersion = $LatestVersion.Replace("v","")
|
||||||
|
|
||||||
#Get current installed version
|
|
||||||
[xml]$About = Get-Content "$WorkingDir\config\about.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
|
||||||
[version]$CurrentVersion = $About.app.version
|
|
||||||
|
|
||||||
#If newer version is avalable, return $True
|
#If newer version is avalable, return $True
|
||||||
if ($AvailableVersion -gt $CurrentVersion){
|
if ($AvailableVersion -gt $CurrentVersion){
|
||||||
Write-Log "WAU Current version: $CurrentVersion. Version $AvailableVersion is available." "Yellow"
|
Write-Log "WAU Current version: $CurrentVersion. Version $AvailableVersion is available." "Yellow"
|
||||||
|
|
Loading…
Reference in New Issue