Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1413
  • Last Modified:

Script to identify multimonitor setup

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
thomasd04
Asked:
thomasd04
1 Solution
 
Bill PrewCommented:
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
 
mcsweenSr. Network AdministratorCommented:
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
 
thomasd04Author Commented:
Good idea. I'll try that tomorrow morning. Thanks.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
thomasd04Author Commented:
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
 
yelbaglfCommented:
What about pulling this info from the below key?

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY
0
 
thomasd04Author Commented:
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
 
thomasd04Author Commented:
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
 
thomasd04Author Commented:
No other solution provided at this time was successful.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now