Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get monitor info

Status
Not open for further replies.

brownsofa

Technical User
May 24, 2004
6
CA
I cannot seem to get any information about my monitor from W2K. I have used several WMI calls but no information. I know that I can get information becuase other marketed products have been able to get the info for display. Even if there is a free utility for me to use I would not mind:

I have tried:
win32_videocontroller
win32_videoconfiguration
win32_displaydesktop
win32_displayconfiguration

Has anyone else got this to work?

Brownsofa
 
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_DesktopMonitor",,48)
For Each objItem in colItems
strString = strString & "Availability: " & objItem.Availability & vbcrlf
strString = strString & "Bandwidth: " & objItem.Bandwidth & vbcrlf
strString = strString & "Caption: " & objItem.Caption & vbcrlf
strString = strString & "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode & vbcrlf
strString = strString & "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig & vbcrlf
strString = strString & "CreationClassName: " & objItem.CreationClassName & vbcrlf
strString = strString & "Description: " & objItem.Description & vbcrlf
strString = strString & "DeviceID: " & objItem.DeviceID & vbcrlf
strString = strString & "DisplayType: " & objItem.DisplayType & vbcrlf
strString = strString & "ErrorCleared: " & objItem.ErrorCleared & vbcrlf
strString = strString & "ErrorDescription: " & objItem.ErrorDescription & vbcrlf
strString = strString & "InstallDate: " & objItem.InstallDate & vbcrlf
strString = strString & "IsLocked: " & objItem.IsLocked & vbcrlf
strString = strString & "LastErrorCode: " & objItem.LastErrorCode & vbcrlf
strString = strString & "MonitorManufacturer: " & objItem.MonitorManufacturer & vbcrlf
strString = strString & "MonitorType: " & objItem.MonitorType & vbcrlf
strString = strString & "Name: " & objItem.Name & vbcrlf
strString = strString & "PixelsPerXLogicalInch: " & objItem.PixelsPerXLogicalInch & vbcrlf
strString = strString & "PixelsPerYLogicalInch: " & objItem.PixelsPerYLogicalInch & vbcrlf
strString = strString & "PNPDeviceID: " & objItem.PNPDeviceID & vbcrlf
strString = strString & "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities & vbcrlf
strString = strString & "PowerManagementSupported: " & objItem.PowerManagementSupported & vbcrlf
strString = strString & "ScreenHeight: " & objItem.ScreenHeight & vbcrlf
strString = strString & "ScreenWidth: " & objItem.ScreenWidth & vbcrlf
strString = strString & "Status: " & objItem.Status & vbcrlf
strString = strString & "StatusInfo: " & objItem.StatusInfo & vbcrlf
strString = strString & "SystemCreationClassName: " & objItem.SystemCreationClassName & vbcrlf
strString = strString & "SystemName: " & objItem.SystemName & vbcrlf
Next

msgbox strString
 
Thanks for the full reply. Did not work. I get "standard monitor type all time, but on the bright side on another PC I got "plug and play monitor". So maybe its my set up for this item. No big deal because:


What I would really like is to retrieve the serial number I did not see anything up there about a serial number. Am I wrong or is there something else that can help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top