lkpvoice.blogg.se

Find monitor serial number remotely
Find monitor serial number remotely










find monitor serial number remotely

Set WshShell = WScript.CreateObject("WScript.Shell") If ((StrMsg = vbNull) Or (StrMsg = "")) Then & "Serial# (EDID): " & strSerial & vbCrLf & "Description: " & strDeviceDesc & vbCrLf _ StrMsg = "Manufacturer: " & strMfg & vbCrLf _ If ((strSerial vbNull) And (strSerial "")) Then ObjReg.GetBinaryValue HKEY_LOCAL_MACHINE, strSubSubKeyPath & "\Device Parameters", "EDID", arrRawEDID ObjReg.GetBinaryValue HKEY_LOCAL_MACHINE, strSubSubKeyPath & "\Device Parameters", "BAD_EDID", arrBadEDID If InStr( strDeviceDesc, " " ) Then strDeviceDesc = Mid( strDeviceDesc, InStr( strDeviceDesc, " " ) + 1 ) ObjReg.GetStringValue HKEY_LOCAL_MACHINE, strSubSubKeyPath, "DeviceDesc", strDeviceDesc If InStr( strMfg, " " ) Then strMfg = Mid( strMfg, InStr( strMfg, " " ) + 1 ) If IsNull( strMfg ) Then strMfg = "unknown" ObjReg.GetStringValue HKEY_LOCAL_MACHINE, strSubSubKeyPath, "Mfg", strMfg If arrSub2(k) = "Control" Then blnControl = True ObjReg.EnumKey HKEY_LOCAL_MACHINE, strSubSubKeyPath, arrSub2 StrSubSubKeyPath = strSubKeyPath & "\" & arrSubKeys( j ) ObjReg.EnumKey HKEY_LOCAL_MACHINE, strSubKeyPath, arrSubKeys StrSubKeyPath = strKeyPath & "\" & arrKeys( i ) ObjReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrKeys StrKeyPath = "SYSTEM\CurrentControlSet\Enum\DISPLAY" Set objReg = GetObject( "winmgmts:!//" & strComputer & "/root/default:StdRegProv" ) ' Script modified fromĭim arrControl, arrKeys, arrRawEDID, arrSubKeysĭim strComputer, strDeviceDesc, strMfg, strModel, strMsg, strKeyPath, strSerial, strSubKeyPath, strSubSubKeyPath So the only improvements it could use would be to come up single spaced, and also for some reason on my home PC, it shows 2 monitors (with same SN). It shows up in the custom inventory, but double spaced. I also made a custom inventory rule to return the fileinfo of that file.

find monitor serial number remotely

'arrSerialNumberID = objItems.SerialNumberID()įor Each arrValue As UInt16 In objItems.I modified the script from I mentioned above to output a textfile to C:\Windows\Temp\KACE-Monitor-info.txt. If objItems.SerialNumberID Is Nothing Then ObjWMIService = GetObject("winmgmts:" & "!\\" & strComputer & "\root\wmi")ĬolItems = objWMIService.ExecQuery("SELECT * FROM WMIMonitorID") Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Clickĭim strComputer As String, serialNum As String, instanceName As String Using a vbscript I could get the right serial number, so I know the result from the vb code is wrong. I ran a WMI Code Creator and I also got 0 as result for a remote computer. However, with the same logic of the code, I can get other values on remote computers like the ManufacturerName by instead.

find monitor serial number remotely

The code works well for a local computer but I got 0 as result for remote computers. I am using the vb.net code bellow to try to get the monitor serial number of any computer on the network.












Find monitor serial number remotely