6 Replies Latest reply on Apr 22, 2013 2:08 AM by gujdts

    Missing Video Monitor Data


      We use the ldms version 9.0. Our Inventory data regarding display informations consists of many wmi details like Manufacturer, Model, Serial Number, etc. But there is no property that shows us if the display is active and in a connected state. But this property is inventored and mentioned in the provLSMClient.mof file:


      "[read : ToSubClass, Description("This atribute tells if the monitor is currently in use by the system.")] boolean InUse;"


      This value is also provided in the LD_DesktopMonitor wmi class. But it is not processed by the LDISCN32.EXE to the INVDELTA.DAT. So we don't have these propertys in the inventory database and cannot differentiate between active displays and all the other displays that were formerly connected to this device. Some clients have up to 30 displays connected in the past. How do you handle these inaccurate informations?


      Any help would be very appreciated. Thanks in advance!


      Greetings,  Willem

        • 1. Re: Missing Video Monitor Data
          lewisd Apprentice

          I to am experiencing the same problem.

          If landesk cannot tell us which is the current monitor, can you at least tell us how to clear the old data.


          Glad to see such a fast response time to the creator of this feed, back in APRIL 2010.


          Surely other people find this an irritation. 

          • 2. Re: Missing Video Monitor Data

            we found no help regarding this topic. so we wrote a script to collect display data from both wmi keys and registry edid keys. these entrys were added to our landesk inventory database, so we can use them in all common querys.

            • 3. Re: Missing Video Monitor Data
              lewisd Apprentice

              Thanks for the quick post.


              Could you be so kind as to post a little more detail for what WMI keys, and what reg keys you reported on.




              • 4. Re: Missing Video Monitor Data

                WMI Class: Win32_DesktopMonitor

                RegKeyPath: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY


                we filtered the registry for displays, that have a "control" subfolder.

                this indicates that the device is connected and active (at least with windows xp).


                the edid entry for each display contains all useful information about the device.

                to enumerate this string there are several guides available, i.e. http://en.wikipedia.org/wiki/Extended_display_identification_data

                • 5. Re: Missing Video Monitor Data

                  2 YEARS LATER --- Still no answer for this from LANDesk.


                  Every KB I see here is UNANSWERED.


                  here is some info I have collected to make it work:

                  Win32_DesktopMonitor class property: Availability (a value of 3 = on!)



                  1 (0x1)


                  2 (0x2)


                  3 (0x3)

                  Running or Full Power

                  4 (0x4)


                  5 (0x5)

                  In Test

                  6 (0x6)

                  Not Applicable

                  7 (0x7)

                  Power Off

                  8 (0x8)

                  Off Line

                  9 (0x9)

                  Off Duty

                  10 (0xA)


                  11 (0xB)

                  Not Installed

                  12 (0xC)

                  Install Error

                  13 (0xD)

                  Power Save - Unknown

                  The device is known to be in a power save mode, but its exact status is unknown.

                  14 (0xE)

                  Power Save - Low Power Mode

                  The device is in a power save state but still functioning, and may exhibit degraded performance.

                  15 (0xF)

                  Power Save - Standby

                  The device is not functioning, but could be brought to full power quickly.

                  16 (0x10)

                  Power Cycle

                  17 (0x11)

                  Power Save - Warning

                  The device is in a warning state, though also in a power save mode.




                  ------- A simple PowerShell script to display a monitor SN-----

                  $RegPath = "SYSTEM\CurrentControlSet\Enum"

                  $objMonitor = Get-WmiObject -Class win32_desktopmonitor -ComputerName $strTarget


                  Write-Host "............ Monitor Serial Numbers ............"   -foregroundcolor black -backgroundcolor yellow


                  if ( $objMonitor -eq $null){ Write-Host "Error connecting to $strTarget. Check DCOM" }



                  $iCount = $objMonitor.count




                  new-variable -force -name startupVariables -value ( Get-Variable |

                     % { $_.Name } )



                  FOR (; $x -lt $iCount; $x++) {

                        $Path = $objMonitor.SyncRoot[$x].PNPDeviceID

                        $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine", $strTarget)

                        if ( $Path -ne $null){

                            $OpenSubKey = $reg.OpenSubKey("$RegPath\$Path\Device Parameters")

                            $EDID = $OpenSubKey.GetValue("EDID")

                          foreach($int in $EDID){

                                  $EDID_String = $EDID_String+([char]$int)



                           $checkstring = [char]0x00 + [char]0x00 + [char]0x00 + [char]0xFF + [char]0x00

                           $matchfound =  $EDID_String -match "$checkstring(\S+)"

                           if($matchfound){$MonSerial = [string]$matches[1]} else {$MonSerial = "No Serial Detected"}


                           Write-Host $MonSerial







                  • 6. Re: Missing Video Monitor Data

                    We already got that fixed, thanks for the reply tho.


                    However, beside the problems already described in this thread, we discovered, that the default size of the monitor sn field is too short for some manufacturers monitor sn, also some manufacturers like Acer for example use some bits within the EDID to extend the sn in a way the LANdesk doesn't recognize.


                    Because of that we extended the LANDesk DB with custom fields for monitors, skiping the default ones, have a script (more or less like what neoistaken posted above) wich creates registry keys with the sn and have the scanengine collect those keys and updated them into the custom LanDesk DB fields.


                    I extracted a script sample and reworked it to incorporate with neo's script. Didn't test it but it should give a lead how to get things done.




                    # get and convert manufacturer ID from EDID by getting and bit shifting byte 8/9 and converting to char


                    $strFirstCharArrayToBinStr = [Convert]::ToString($EDID[8], 2)
                    $strFirstCharBitShift = $strFirstCharArrayToBinStr.padleft(8, '0').remove(0,1).remove(5,2)
                    $chrFirstChar = [char]([Convert]::ToInt32($strFirstCharBitShift, 2) + 64)
                    $strSecondCharArrayToBinStr = [Convert]::ToString($EDID[9], 2)
                    $strSecondCharBitShiftFirstPart = $strFirstCharArrayToBinStr.padleft(8, '0').remove(0,6)
                    $strSecondCharBitShiftSecondPart = $strSecondCharArrayToBinStr.padleft(8, '0').remove(3,5)
                    $strSecondCharBitShift = $strSecondCharBitShiftFirstPart + $strSecondCharBitShiftSecondPart
                    $chrSecondChar = [char]([Convert]::ToInt32($strSecondCharBitShift, 2) + 64)
                    $strThirdCharBitShift = $strSecondCharArrayToBinStr.padleft(8, '0').remove(0,3)
                    $chrThirdChar = [char]([Convert]::ToInt32($strThirdCharBitShift, 2) + 64)
                    $strManufacturerID = $chrFirstChar + $chrSecondChar + $chrThirdChar


                    # get and calculate manufacturing year (byte 17 + offset 1990) / week (byte 16)


                    $strManufacturerYear = $EDID[17] + 1990
                    $strManufacturerWeek = $EDID[16]


                    # special case : Acer displays (manufacturer = ACR) have an extended serialnumber the "normal" serial has to be split up after the 8th char and the byte arrays 15-12 will be inserted hex formated
                    if ($strManufacturerID -eq "ACR") {


                      # additional serial number char are directly converted from bytes 15 - 12 (reverse) to hex (not by converting to char like the rest)


                      $strAcerSerialExtension = ("{0:X}" -f $EDID[15]).padleft(2,'0') + ("{0:X}" -f $EDID[14]).padleft(2,'0') + ("{0:X}" -f $EDID[13]).padleft(2,'0') + ("{0:X}" -f $EDID[12]).padleft(2,'0')
                      $strDisplaySerial = $strDisplaySerial.insert(8,$strAcerSerialExtension)




                    This only works if the EDID is valid ofcourse, so this has to be checked in advance.


                    In addition to the full Acer sn  you also get :


                    - Year of fabrication = $strManufacturerYear

                    - Year's week of fabrication = $strManufacturerWeek

                    - Manufacturer ID = $strManufacturerID


                    If you also want the displays name try something like this :



                    # search for display name start marker within the EDID marked by 00 00 FC 00 + 3 until end marker 0A
                    for ($intByteEnum = 7;$intByteEnum -lt $$EDID.count - 4;$intByteEnum++) {
                      if (($$EDID[$intByteEnum] -eq 0) -and ($$EDID[$intByteEnum + 1] -eq 0) -and ($$EDID[$intByteEnum + 2] -eq 252) -and ($$EDID[$intByteEnum + 3] -eq 0)){$intDisplayNamePointer = $intByteEnum + 3}
                    if ($intDisplayNamePointer -ne 0) # if name was found within EDID
                      for ($intByteEnum = 1;$intByteEnum -lt 13;$intByteEnum++) { # enum 13 bytes or break if stop byte (= 10)


                        if ($$EDID[$intDisplayNamePointer + $intByteEnum] -eq 10){$bolEndDisplayName = 1}else{$bolEndDisplayName = 0}
                        if ($bolEndDisplayName -ne 1){$strDisplayName += [char]$$EDID[$intDisplayNamePointer+$intByteEnum]}




                    After that the display name should be $strDisplayName


                    I hope this is helpful in a way or two...