How to catch the monitor serial via code

Asked

Viewed 244 times

0

  • It must be different in Windows 10 that you need to check ... it is not a good then mess with this script ...

  • 2

    From what I understand of the code it picks up by the windows registry, on the way: HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\Default_Monitor, if studying this is almost certain (it seems to me) that it will be able to create a reasonably simpler algorithm that takes such data.

  • 1

    I voted to close, but I think that perhaps the case of this question is reasonable, so I am voting to reopen, I even understand that the author has not presented any attempt, but since there is already an answer and that the question is very objective (which I think helps a lot), it doesn’t have much to improve and so it seems reasonable and useful for future visitors.

1 answer

0


On Windows, I would recommend you to search for this information using wmi.

Import the reference below:

Imports System.Management

And search the serial data using the table Wmimonitorid:

Dim searcher As New ManagementObjectSearcher("root\WMI", "SELECT * FROM WMIMonitorID")
For Each queryObj As ManagementObject In searcher.Get()
    Dim serial() As UInt16 = queryObj("SerialNumberID")
Next

Browser other questions tagged

You are not signed in. Login or sign up in order to post.