Skip to content

Commit

Permalink
Improve comments for supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
valleyofdoom committed Jul 13, 2024
1 parent b630567 commit 8abb6e0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions bin/apply-registry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1001,9 +1001,22 @@ function main() {
$hasMaxVer = $key.Contains("max_version")

if ($hasMinVer -and $hasMaxVer) {
$keyString += " ; versions $(Get-WinVer -windowsBuild $key["min_version"]) $($key["min_version"]) - $(Get-WinVer -windowsBuild $key["max_version"]) $($key["max_version"])"
$minVer = $key["min_version"]
$maxVer = $key["max_version"]
$minWinVer = Get-WinVer -windowsBuild $minVer
$maxWinVer = Get-WinVer -windowsBuild $maxVer

$keyString += "; $($minWinVer) $($minVer)"

if ($minVer -eq $maxVer) {
$keyString += " only"
} elseif ($minWinVer -eq $maxWinVer) {
$keyString += " - $($maxVer)"
} else {
$keyString += " - $($maxWinVer) $($maxVer)"
}
} elseif ($hasMinVer -and -not $hasMaxVer) {
$keyString += " ; $(Get-WinVer -windowsBuild $key["min_version"]) $($key["min_version"]) or later"
$keyString += " ; $(Get-WinVer -windowsBuild $key["min_version"]) $($key["min_version"]) and later"
} elseif (-not $hasMinVer -and $hasMaxVer) {
$keyString += " ; $(Get-WinVer -windowsBuild $key["max_version"]) $($key["max_version"]) and earlier"
}
Expand Down

0 comments on commit 8abb6e0

Please sign in to comment.