Minor change

Get version when AutoUpdate is disabled
pull/23/head
Romain 2022-03-07 12:16:01 +01:00 committed by GitHub
parent 9f5cc6d256
commit d90e0413fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -233,6 +233,10 @@ function Start-WAUUpdateCheck{
[xml]$UpdateStatus = Get-Content "$WorkingDir\config\config.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
$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
if ($AutoUpdateStatus -eq $false){
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
[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 ($AvailableVersion -gt $CurrentVersion){
Write-Log "WAU Current version: $CurrentVersion. Version $AvailableVersion is available." "Yellow"