主题
WindowsDeviceInfo 继承自: DeviceInfo
Windows 系统的设备信息快照。
由 Windows 平台上的 get_device_info 返回。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
computer_name | str | required | The computer's fully-qualified DNS name, where available. |
number_of_cores | int | required | Number of CPU cores on the local machine. |
system_memory | int | required | The physically installed memory in the computer, in megabytes. This may not be the same as available memory. |
user_name | str | required | The name of the current user. |
major_version | int | required | The major version number of the operating system. For example, for Windows 2000, the major version number is 5. For more info, see the table in Remarks: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_osversioninfoexw#remarks |
minor_version | int | required | The minor version number of the operating system. For example, for Windows 2000, the minor version number is 0. For more info, see the table in Remarks: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_osversioninfoexw#remarks |
build_number | int | required | The build number of the operating system. Examples: - 22000 or greater for Windows 11. - 10240 or greater for Windows 10. |
platform_id | int | required | The operating system platform. For Win32 on NT-based operating systems, RtlGetVersion returns the value VER_PLATFORM_WIN32_NT. |
csd_version | str | required | The service-pack version string. This member contains a string, such as "Service Pack 3", which indicates the latest service pack installed on the system. |
service_pack_major | int | required | The major version number of the latest service pack installed on the system. For example, for Service Pack 3, the major version number is three. If no service pack has been installed, the value is zero. |
service_pack_minor | int | required | The minor version number of the latest service pack installed on the system. For example, for Service Pack 3, the minor version number is zero. |
suit_mask | int | required | The product suites available on the system. |
product_type | int | required | The product type. This member contains additional information about the system. |
reserved | int | required | Reserved for future use. |
build_lab | str | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLab registry key. For example: "22000.co_release.210604-1628". |
build_lab_ex | str | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLabEx registry key. For example: "22000.1.amd64free.co_release.210604-1628". |
display_version | str | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion registry key. For example: "21H2". |
edition_id | str | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID registry key. |
install_date | datetime | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate registry key. |
product_id | str | required | Displayed as "Product ID" in Windows Settings. Value of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId registry key. For example: "00000-00000-0000-AAAAA". |
product_name | str | required | Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName registry key. For example: "Windows 10 Home Single Language". |
registered_owner | str | required | Value of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner registry key. For example: "Microsoft Corporation". |
release_id | str | required | Value of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId registry key. For example: "1903". |
device_id | str | required | Displayed as "Device ID" in Windows Settings. Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\MachineId registry key. |
locales | list[Locale] | required | The full system-reported supported locales of the device. This establishes the language and formatting conventions that application should, if possible, use to render their user interface. The list is ordered in order of priority, with lower-indexed locales being preferred over higher-indexed ones. The first element is the primary locale. The on_locale_change event is called whenever this value changes. |