OSのバージョン情報を辞書配列で返します。
辞書配列のキーと値の関係は、下記のようになります。
値は全て整数値です(CSDVersion を除く)。
- MajorVersion
- OSのメジャーバージョン番号
- MinorVersion
- OSのマイナーバージョン番号
- BuildNumber
- ビルド番号。
- PlatformId
- プラットフォームID。
- CSDVersion
- 拡張情報文字列。
- SimpleId
- OSの簡易識別ID。
Windows NT 4.0 Service Pack 6 以降では、さらに下記の情報(キー)が追加されます。
- ServicePackMajor
- サービスパックのメジャーバージョン番号。
- ServicePackMinor
- サービスパックのマイナーバージョン番号。
- SuiteMask
- 利用可能な製品スイート。
- ProductType
- システムに関する追加情報。
- Reserved
- 予約(未使用)。
この辞書配列には、
Dictionary.addDefaultで追加されたキーは含まれません。
戻り値のキーPlatformId(プラットフォームID)、SuiteMask(利用可能な製品スイート)、ProductType(システムに関する追加情報)、SimpleId(OSの簡易識別ID)は、以下のように扱います。
PlatformId(プラットフォームID)は、下記の定数とを整数値で比較し、一致したものが該当するプラットフォームということになります。
- tposPlatformWin32Windows
- Windows 9x系。
- tposPlatformWin32NT
- Windows NT系。
- tposPlatformWin32s
- 未使用。
SuiteMask(利用可能な製品スイート)は、下記の定数とのビット論理積を取った結果が非ゼロであれば、その製品スイートに該当することになります。
- tposSmallBusiness
- Microsoft Small Business Server
- tposEnterprise
- Windows NT 4.0 Enterprise Edition または Windows 2000 Advanced Server または Windows Server 2003 Enterprise Edition
- tposBackOffice
- Microsoft BackOffice コンポーネント
- tposTerminal
- ターミナルサービス
- tposSmallBusinessRestricted
- Microsoft Small Business Server(制限クライアントライセンス)
- tposDataCenter
- Windows 2000 Datacenter Server または Windows Server 2003 Datacenter Edition
- tposPersonal
- Windows XP Home Edition
- tposBlade
- Windows Server 2003 Web Edition
- tposSecurityAppliance
- Windows Server 2003 is installed as a hardened operating system as part of a security appliance.
ProductType(システムに関する追加情報)は、下記の定数とを整数値で比較し、一致したものが該当するプロダクトということになります。
- tposNTWorkstation
- Windows NT 4.0 Workstation または Windows 2000 Professional または Windows XP Home Edition または Windows XP Professional
- tposNTDomainController
- ドメインコントローラ
- tposNTServer
- サーバ
SimpleId(OSの簡易識別子)は、下記の定数とを整数値で比較し、一致したものが該当するOSということになります。
- tposUnknownOS
- 判別不能
- tposWindows95
- Windows 95
- tposWindows95OSR10
- Windows 95 OEM Service Release 1 or Service Pack 1
- tposWindows95OSR20
- Windows 95 OEM Service Release 2
- tposWindows95OSR21
- Windows 95 OEM Service Release 2.1
- tposWindows95OSR25
- Windows 95 OEM Service Release 2.5
- tposWindows98
- Windows 98
- tposWindows98SE
- Windows 98 Second Edition
- tposWindowsMe
- Windows Millenium Edition
- tposWindowsNT3x
- Windows NT 3.x
- tposWindowsNT4
- Windows NT 4.0
- tposWindows2000
- Windows 2000
- tposWindowsXP
- Windows XP
- tposWindowsServer2003
- Windows Server 2003