跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 大佬们好,问下 Python 获取电脑硬件信息,类似鲁大师那种。
未分類
8 10 月 2020

大佬们好,问下 Python 获取电脑硬件信息,类似鲁大师那种。

大佬们好,问下 Python 获取电脑硬件信息,类似鲁大师那种。

資深大佬 : legendnan 3

用 wmi 能获取到显卡信息,但是我的电脑上装有远程工具。现在读取到了 3 个信息。请问我要如何才能知道我用的是哪个?而且如果电脑有集成显卡跟独显,我想要独显的不要集成显卡,请问如何实现?

py 代码:
for xk in w.Win32_VideoController():
print(xk)
print(“”)

系统返回信息
instance of Win32_VideoController
{
AdapterCompatibility = “Intel Corporation”;
AdapterDACType = “Internal”;
AdapterRAM = 1073741824;
Availability = 3;
Caption = “Intel(R) HD Graphics 630”;
ConfigManagerErrorCode = 0;
ConfigManagerUserConfig = FALSE;
CreationClassName = “Win32_VideoController”;
CurrentBitsPerPixel = 32;
CurrentHorizontalResolution = 1680;
CurrentNumberOfColors = “4294967296”;
CurrentNumberOfColumns = 0;
CurrentNumberOfRows = 0;
CurrentRefreshRate = 59;
CurrentScanMode = 4;
CurrentVerticalResolution = 1050;
Description = “Intel(R) HD Graphics 630”;
DeviceID = “VideoController1”;
DitherType = 0;
DriverDate = “20171115000000.000000-000”;
DriverVersion = “21.20.16.4860”;
InfFilename = “oem6.inf”;
InfSection = “iKBLD_w7”;
InstalledDisplayDrivers = “igdumdim64.dll,igd10iumd64.dll,igd10iumd64.dll,igdumdim32,igd10iumd32,igd10iumd32”;
MaxRefreshRate = 75;
MinRefreshRate = 59;
Monochrome = FALSE;
Name = “Intel(R) HD Graphics 630”;
PNPDeviceID = “PCI\VEN_8086&DEV_5912&SUBSYS_7A741462&REV_04\3&11583659&0&10”;
Status = “OK”;
SystemCreationClassName = “Win32_ComputerSystem”;
SystemName = “PC-20190727BPDJ”;
VideoArchitecture = 5;
VideoMemoryType = 2;
VideoModeDescription = “1680 x 1050 x 4294967296 colors”;
VideoProcessor = “Intel(R) HD Graphics Family”;
};

instance of Win32_VideoController
{
AdapterCompatibility = “Shanghai Best Oray Information Technology Co., Ltd.”;
Availability = 8;
Caption = “Oray Display Mirror Driver”;
ConfigManagerErrorCode = 0;
ConfigManagerUserConfig = FALSE;
CreationClassName = “Win32_VideoController”;
Description = “Oray Display Mirror Driver”;
DeviceID = “VideoController2”;
DriverDate = “20111026000000.000000-000”;
DriverVersion = “1.0.1.17485”;
InfFilename = “oem25.inf”;
InfSection = “OrayMir_Inst”;
Monochrome = FALSE;
Name = “Oray Display Mirror Driver”;
PNPDeviceID = “ROOT\DISPLAY\0000”;
Status = “OK”;
SystemCreationClassName = “Win32_ComputerSystem”;
SystemName = “PC-20190727BPDJ”;
VideoArchitecture = 5;
VideoMemoryType = 2;
};

instance of Win32_VideoController
{
AdapterCompatibility = “Famatech”;
Availability = 8;
Caption = “Radmin Mirror Driver V3”;
ConfigManagerErrorCode = 0;
ConfigManagerUserConfig = FALSE;
CreationClassName = “Win32_VideoController”;
Description = “Radmin Mirror Driver V3”;
DeviceID = “VideoController3”;
DriverDate = “20070808000000.000000-000”;
DriverVersion = “3.1.0.0”;
InfFilename = “oem31.inf”;
InfSection = “mirrorv3”;
Monochrome = FALSE;
Name = “Radmin Mirror Driver V3”;
PNPDeviceID = “ROOT\DISPLAY\0001”;
Status = “OK”;
SystemCreationClassName = “Win32_ComputerSystem”;
SystemName = “PC-20190727BPDJ”;
VideoArchitecture = 5;
VideoMemoryType = 2;
};

大佬有話說 (6)

  • 資深大佬 : ragnaroks

    VideoMemoryType == 3

  • 資深大佬 : ShuoHui

    看着头疼,建议代码下次用 md 包一下

  • 主 資深大佬 : legendnan

    @ragnaroks 大佬,我的电脑用的集成的,videoMemoryType 也是 2 呢,这个集成的与远程工具如何区分?

  • 資深大佬 : ungrown

    https://www.thepythoncode.com/article/get-hardware-system-information-python
    仅供参考

  • 資深大佬 : wittyfans

    用 python 调用 cmd 或者 powershell

  • 資深大佬 : ragnaroks

    @legendnan 集成显卡借用的系统内存,可以区分独显,不过远程桌面可能要想别的办法

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具