Solved

Script to identify multimonitor setup

Posted on 2011-03-23
8
1,397 Views
Last Modified: 2012-05-11
Using a logon script I'm trying to collect data about the monitors that our users have connected to their PC. I was pulling this information using WMI Win32_DesktopMonitor Class but realized that it wasn't pulling data from both monitors. I believe the reason why is because the dual monitor setups are created using Bizlink Dual Monitor cables. These cables allow output from a single DVI and output seperate signals on two seperate monitors. So now WMI is only reporting data from one of the monitors instead of from two. Any ideas on how I could get this information?
0
Comment
Question by:thomasd04
8 Comments
 
LVL 51

Expert Comment

by:Bill Prew
ID: 35202309
It sounds like from the Windows perspective, it just thinks you have one monitor, that equals the dimensions of the two monitors combined? If that is the case, not sure you can easily tell.

Are there any drivers or software that get installed for the Bizlink cable?

And on these systems, what does the resolution get reported as via WMI, perhaps you could look at that and when the horizontal resolution is greater than a normal amount "assume" that they are using dual monitor with Bizlink?

Just brainstorming a bit...

~bp
0
 
LVL 21

Expert Comment

by:mcsween
ID: 35202415
Check to see if it is just spanning a huge resolution across two screens (See the code below).  If you get a ridiculous width then you know there are two monitors.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select ScreenWidth from Win32_DesktopMonitor",,48)
For Each objItem in colItems
    Wscript.Echo "ScreenWidth: " & objItem.ScreenWidth
Next

Open in new window

0
 
LVL 3

Author Comment

by:thomasd04
ID: 35204068
Good idea. I'll try that tomorrow morning. Thanks.
0
 
LVL 3

Author Comment

by:thomasd04
ID: 35204078
Nope, there are no drivers. You just connect the two monitor cables to this device and seconds later the display properties show the second monitor. Of course the performance is reduced but it services it's purpose. If the display settings show the second device, there has to be something in WMI or the registry that would show it to. I just can't find it right now. But checking the width of the resolution is a good start. Thanks both of you and I'll let you know what I find out tomorrow morning.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 11

Expert Comment

by:yelbaglf
ID: 35208929
What about pulling this info from the below key?

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY
0
 
LVL 3

Author Comment

by:thomasd04
ID: 35209518
Unfortunately the screenwidth reported from WMI is only for the primary screen; same result for many objects I've tried with different classes. The secondary is missing from all query results. Also, I wasn't able to identify the second monitor in the registry so far. This is frustrating but I know there has to be a way! Thanks for the suggestions.
0
 
LVL 3

Accepted Solution

by:
thomasd04 earned 0 total points
ID: 35232609
I guess there isn't a good solution for this problem. However, I did find a way to at least identify the number of monitors connected to the workstation. I counted the queried results from WMI class 'WmiMonitorBasicDisplayParams' under '\root\WMI' for the object named 'Active'. Unfortunately I won't be able to collect any other information on the monitor like serial number, manufacturer and other important information I needed to collect an accurate inventory. Thanks for the suggestions.
0
 
LVL 3

Author Closing Comment

by:thomasd04
ID: 35304247
No other solution provided at this time was successful.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now