|
- Local $sCurrentBuildNumber = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'CurrentBuildNumber')
- Local $sEditionID = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'EditionID')
- Switch $sCurrentBuildNumber
- Case '7600'
- $WindowsVer = 'Windows 7 ' & $sEditionID
- Case '7601'
- $WindowsVer = 'Windows 7 ' & $sEditionID & ' SP1'
- Case '9200'
- $WindowsVer = 'Windows 8 ' & $sEditionID
- Case '9600'
- $WindowsVer = 'Windows 8.1 ' & $sEditionID
- Case '10240'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1507'
- Case '10586'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1511'
- Case '14393'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1607'
- Case '15063'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1703'
- Case '16299'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1709'
- Case '17134'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1803'
- Case '17763'
- If $sEditionID = 'EnterpriseS' Then
- $WindowsVer = 'Windows 10 Enterprise LTSC 2019'
- Else
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1809'
- EndIf
- Case '18362'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1903'
- Case '18363'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 1909'
- Case '19041'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 2004'
- Case '19042'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 20H2'
- Case '19043'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 21H1'
- Case '19044'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 21H2'
- Case '19045'
- $WindowsVer = 'Windows 10 ' & $sEditionID & ' 22H2'
- Case '22000'
- $WindowsVer = 'Windows 11 ' & $sEditionID & ' 21H2'
- Case '22621'
- $WindowsVer = 'Windows 11 ' & $sEditionID & ' 22H2'
- Case Else
- $WindowsVer = '无法确定当前系统版本!'
- EndSwitch
- MsgBox(4096,'',$WindowsVer)
复制代码
我现在用这个。
|
|