0

所以我想做的是从主板插槽中的卡中获取名称,型号,输入我能找到的任何内容。我需要通过批处理文件来做到这一点。

我该如何获取这些信息?我看了systeminfo看那里并没有看到它们,也不相信它们在 WMIC 中。是否有另一个可能包含该信息的命令?

如果使用

 wmic SYSTEMSLOT get connectorpinout, connectortype, description, manufacturer, model, name, number, partnumber, slotDesignation, tag

它会像这样输出,这可能会起作用..我使用的电脑没有使用插槽..

                  {0}            System Slot                       System Slot                      PCIE x16         System Slot 0
                  {0}            System Slot                       System Slot                      PCIE x1          System Slot 1
                  {0}            System Slot                       System Slot                      M.2 2280         System Slot 2

再次感谢

4

1 回答 1

0
@"%__AppDir__%wbem\wmic.exe" Path Win32_PnPEntity Where "PNPDeviceID Like '%%PCI\\VEN_%%' And Not Manufacturer Like '%%Standard%%' And Not PNPDeviceID Like '%%PCI\\VEN_808%%'" Get Caption,PNPDeviceID,Manufacturer.

这似乎对我有用,感谢 Compo 的帮助。我发现所有不在插槽中的设备似乎都有 PCI\VEN_808 前缀。除了少数给出标准制造类型的。这可能无法 100% 起作用,但它会产生 1 或 2 个错误读数,通过阅读说明您应该知道它不是插槽中的卡。

我将暂时搁置这一点,直到出现更好的解决方案。

于 2020-04-02T23:48:10.093 回答