Solved

Script to identify multimonitor setup

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

770 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