mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-21 22:50:56 +10:00
version comparison fix
This commit is contained in:
+4
-3
@@ -257,7 +257,8 @@ $upgrade_client = $false
|
|||||||
$os = Get-CimInstance -ClassName "Win32_OperatingSystem" -ErrorAction SilentlyContinue
|
$os = Get-CimInstance -ClassName "Win32_OperatingSystem" -ErrorAction SilentlyContinue
|
||||||
if ($os) {
|
if ($os) {
|
||||||
$osCaption = $os.Caption
|
$osCaption = $os.Caption
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$osCaption = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName
|
$osCaption = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName
|
||||||
}
|
}
|
||||||
$pattern = "\bWindows (7|8(\.1)?|10|11|12)\b"
|
$pattern = "\bWindows (7|8(\.1)?|10|11|12)\b"
|
||||||
@@ -1105,8 +1106,8 @@ function Helper($paramname) {
|
|||||||
|
|
||||||
$contents | ForEach-Object {
|
$contents | ForEach-Object {
|
||||||
|
|
||||||
if ( $json.$PSItem.version.do ) { $do = $json.$PSItem.version.do -ge $offline_patch } else { $do = $true }
|
if ( $json.$PSItem.version.do ) { $do = [version]$json.$PSItem.version.do -ge [version]$offline_patch } else { $do = $true }
|
||||||
if ( $json.$PSItem.version.from ) { $from = $json.$PSItem.version.from -le $offline_patch } else { $from = $false }
|
if ( $json.$PSItem.version.from ) { $from = [version]$json.$PSItem.version.from -le [version]$offline_patch } else { $from = $false }
|
||||||
|
|
||||||
$checkVer = $from -and $do; $translate = $paramname -eq "RuTranslate"
|
$checkVer = $from -and $do; $translate = $paramname -eq "RuTranslate"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user