Monitor ID and Serial Number

前端 未结 4 522
粉色の甜心
粉色の甜心 2021-01-16 06:16

In Windows we have information about our Monitros - some unique name and id. e.g.

  1. Acer xxx
  2. Samsung xxx

I have qeuestion how to get the

4条回答
  •  被撕碎了的回忆
    2021-01-16 07:07

    It seems to me that root/CIMV2/Win32_DesktopMonitor/PnPDeviceID (1) and root/WMI/WMIMonitorId/InstanceName (2) are nearly identical

    I found the following on my computer using WMI Explorer

    (1) DISPLAY\HWP2868\5&3EB7FBC&0&UID16777472

    (2) DISPLAY\HWP2868\5&3eb7fbc&0&UID16777472_0

    There are two differences: the _0 at the end of (2) and the fact that parts of (2) is lower case.

    I do not have more than a single monitor for reference at the moment, therefore I can not provide you with a more accurate way to associate the two entries. But it looks to me like you could write two queries, modifying the search condition in one of them to match the other's format. But you need to investigate whether or not there is a reliable pattern to do so.

    At any rate, there seems to be enough common elements to be able to make a match in code, if not by query.

提交回复
热议问题