Solved

Script to identify multimonitor setup

Posted on 2011-03-23
8
1,403 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 53

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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
 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

828 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