| I'm noticing
that SMS is not returning the monitor manufacturer and model as part of
Hardware Inventory in all cases. Any ideas?
Contributed By: Kenneth Lyons
Add the 'Win32_DesktopMonitor'
class to the 'SMS_DEF.MOF'
using the text below. This brings back the monitor driver as described in
the display properties, so if the installed driver is simply 'Default
Monitor', then that is what this
returns. If you have the manufacturer's driver installed, then this will
return the description (i.e. Sony CPD-220GS). It does not, though, inventory
the serial number.
Note that it does bring back the 'PNPDeviceID'
which can be very useful in determining the monitor models that have 'Default
Monitor' as the description. For
example, all of my Sony CPD-200SF monitors have a 'PNPDeviceID'
of 'DISPLAY\SNY0270\5&41D9869&0&70000001&01&00'.
So if one of them doesn't have the true driver installed, then I can still
tell what it is by looking at the 'PNPDeviceID'.
Another caveat is that this returns "all" monitors installed. Frequently a
PC will have more than one driver installed (look at the Device Manager and
you'll see what I'm talking about). Most of mine have both a 'Default
Monitor' and the true monitor
installed. So you'll have to structure queries to handle this.
//---------------------------------------------------------------
//-- Class: Win32_DesktopMonitor --
//---------------------------------------------------------------
[SMS_Report(TRUE),
SMS_Group_Name("Monitor"),
SMS_Class_ID("MICROSOFT|DESKTOP_MONITOR|1.0")]
class Win32_DesktopMonitor : SMS_Class_Template
{
[SMS_Report(TRUE)]
string Caption;
[SMS_Report(TRUE)]
string Description;
[key, SMS_Report(TRUE)]
string DeviceID;
[SMS_Report(TRUE)]
string MonitorManufacturer;
[SMS_Report(TRUE)]
string MonitorType;
[SMS_Report(TRUE)]
string Name;
[SMS_Report(TRUE)]
string PNPDeviceID;
};
|