Solved

Script to identify multimonitor setup

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

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

863 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

23 Experts available now in Live!

Get 1:1 Help Now