Fix build number detection

This commit is contained in:
Calyx Hikari 2025-11-15 11:16:37 +08:00
parent 808cab258d
commit 7117d24dc0
4 changed files with 3 additions and 2 deletions

BIN
$OEM$.zip

Binary file not shown.

1
32
View file

@ -7,6 +7,7 @@ function Main {
}
$procArch = $Env:PROCESSOR_ARCHITECTURE
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
if ($procArch -eq 'ARM') {
Write-Warning "This script does not support Windows RT. Exiting..."
return 1

2
64
View file

@ -7,7 +7,7 @@ function Main {
}
$procArch = $Env:PROCESSOR_ARCHITECTURE
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
if ($procArch -eq 'x86') {
Write-Warning "This script does not support 32-bit Windows. Exiting..."
return 1

View file

@ -11,7 +11,7 @@ function Main {
$procArch = $Env:PROCESSOR_ARCHITECTURE
$isServer = (Get-CimInstance Win32_OperatingSystem).ProductType -ne 1
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
if ($procArch -eq 'ARM') {
Write-Warning "This script does not support Windows RT. Exiting..."
return 1