Skip to content

WindowsDeviceInfo 继承自: DeviceInfo

Windows 系统的设备信息快照。

由 Windows 平台上的 get_device_info 返回。

属性 ​

名称类型默认值说明
computer_namestrrequiredThe computer's fully-qualified DNS name, where available.
number_of_coresintrequiredNumber of CPU cores on the local machine.
system_memoryintrequiredThe physically installed memory in the computer, in megabytes. This may not be the same as available memory.
user_namestrrequiredThe name of the current user.
major_versionintrequiredThe 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_versionintrequiredThe 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_numberintrequiredThe build number of the operating system. Examples: - 22000 or greater for Windows 11. - 10240 or greater for Windows 10.
platform_idintrequiredThe operating system platform. For Win32 on NT-based operating systems, RtlGetVersion returns the value VER_PLATFORM_WIN32_NT.
csd_versionstrrequiredThe 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_majorintrequiredThe 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_minorintrequiredThe 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_maskintrequiredThe product suites available on the system.
product_typeintrequiredThe product type. This member contains additional information about the system.
reservedintrequiredReserved for future use.
build_labstrrequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLab registry key. For example: "22000.co_release.210604-1628".
build_lab_exstrrequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLabEx registry key. For example: "22000.1.amd64free.co_release.210604-1628".
display_versionstrrequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion registry key. For example: "21H2".
edition_idstrrequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID registry key.
install_datedatetimerequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate registry key.
product_idstrrequiredDisplayed 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_namestrrequiredValue of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName registry key. For example: "Windows 10 Home Single Language".
registered_ownerstrrequiredValue of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner registry key. For example: "Microsoft Corporation".
release_idstrrequiredValue of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId registry key. For example: "1903".
device_idstrrequiredDisplayed as "Device ID" in Windows Settings. Value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\MachineId registry key.
localeslist[Locale]requiredThe 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.

关注我,学习大模型、大数据、Python等热门技术。