VBScript, WMI, Win7 & Multiple Monitor Resolution using Win32_DesktopMonitor

A large number of computers at our company are Dells with the ATI Radeon HD graphic cards.  Many users have multiple monitors, often a mix of digital and analog connections, where the display is extended over the two.  A simple "SELECT * FROM Win32_DesktopMonitor" seems to only return information about one of the monitors, preferring the digital connection.  The return can often not be the "main display".  Is there a flaw with the class, or a different query/class that would return information about all displays?  Thanks

I think the problem could be the use of "On Error Resume Next". It could be masking errors and making troubleshooting nearly impossible. I get two errors:
When there is no InstallDate, the function WMIDateStringToDate function raises an error because the value is Null.
When there are no PowerManagmentCapabilities, the value is not an array so the Join function raises an error.
Also, the first statement in function WMIDateStringToDate is an error. The version I used, that accounts for these situations, follows:
Option Explicit
Dim strComputer, objWMIService, colItems, objItem
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "MyComputer"
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_DesktopMonitor", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Availability: " & objItem.Availability
WScript.Echo "Bandwidth: " & objItem.Bandwidth
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode
WScript.Echo "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig
WScript.Echo "CreationClassName: " & objItem.CreationClassName
WScript.Echo "Description: " & objItem.Description
WScript.Echo "DeviceID: " & objItem.DeviceID
WScript.Echo "DisplayType: " & objItem.DisplayType
WScript.Echo "ErrorCleared: " & objItem.ErrorCleared
WScript.Echo "ErrorDescription: " & objItem.ErrorDescription
If IsDate(objItem.InstallDate) Then
WScript.Echo "InstallDate: " & WMIDateStringToDate(objItem.InstallDate)
Else
WScript.Echo "InstallDate: " & objItem.InstallDate
End If
WScript.Echo "IsLocked: " & objItem.IsLocked
WScript.Echo "LastErrorCode: " & objItem.LastErrorCode
WScript.Echo "MonitorManufacturer: " & objItem.MonitorManufacturer
WScript.Echo "MonitorType: " & objItem.MonitorType
WScript.Echo "Name: " & objItem.Name
WScript.Echo "PixelsPerXLogicalInch: " & objItem.PixelsPerXLogicalInch
WScript.Echo "PixelsPerYLogicalInch: " & objItem.PixelsPerYLogicalInch
WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
If IsArray(objItem.PowerManagementCapabilities) Then
strPowerManagementCapabilities = Join(objItem.PowerManagementCapabilities, ",")
WScript.Echo "PowerManagementCapabilities: " & strPowerManagementCapabilities
Else
WScript.Echo "PowerManagementSupported: " & objItem.PowerManagementSupported
End If
WScript.Echo "ScreenHeight: " & objItem.ScreenHeight
WScript.Echo "ScreenWidth: " & objItem.ScreenWidth
WScript.Echo "Status: " & objItem.Status
WScript.Echo "StatusInfo: " & objItem.StatusInfo
WScript.Echo "SystemCreationClassName: " & objItem.SystemCreationClassName
WScript.Echo "SystemName: " & objItem.SystemName
WScript.Echo
Next
Function WMIDateStringToDate(dtmDate)
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) _
& ":" & Mid(dtmDate,13, 2))
End Function
Richard Mueller
MVP ADSI

Similar Messages

  • Multiple Monitor support using RDP in Windows 10

    Does anyone know if you can use multiple monitors when connecting through RDP in Windows 10? In Windows 7, you need to be using Windows 7 Ultimate in order for RDP to support more than one monitor.
    For example, my home setup has (2) 22" monitors and I want to RDP to my work PC which also has (2) 22" monitors. We are running windows 7 Pro, so only one monitor would display on my home PC and I couldn't view my 2nd work monitor.
    Thanks!

    Michalsm2000,
    I can't test that due to the shortage of resources.
    For the RDP multiple Monitor support, it should be supposed to work on Windows 10.
    Regarding what is new in RDP, you may check:
    What's New in Remote Desktop Services in the Windows Server Technical Preview
    Regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How do I develop for multiple screen resolutions using Adobe Air

    Hi,
    I'm looking at developing mobile apps using Adobe Air but there's something I'm not quite sure. Sorry if this is a newbie question or has been repeated but I have looked at tutorials, etc but just want to get a general idea on how to prepare the assets. Here are some of my questions:-
    1) If I want to develop for the iPhone non-retina and retina resolution, do I actually need to only write the code and layout the graphics in retina(960 x 640) stage size and it will automatically scale down for non-retina resolution?
    2) How do I cater for iPhone 5 resolution? Do I actually need to swap say the background images through code by detecting the resolution size it was in? or do I actually just leave the background image longer it exceeds the stage height so when it's iPhone 5 it will show everything?
    thanks for the help!

    If you are talking about regular Flash work, and not your own code-layout application, then what happens depends on the scale mode of the stage. Typically, when doing code layout the stage is set to no_scale, and you have to do all the hard work yourself, calculating the size of things, and laying them out with ActionScript.
    If it's more of a typical Flash graphical scene there are two other scale modes that make life easier for you.
    The default scale mode is show_all. With that you will be certain to see all of the content of your original Flash stage, and if the screen is a wider ratio than your stage, the content that is off the sides of the stage will be revealed. See this app I made, that uses that technique:
    https://itunes.apple.com/us/app/meet-heckerty-funny-interactive/id514220257?mt=8
    It works well enough, I have enough extra background graphics to go out to a 16:9 screen, including iPhone 5. That particular stage is 1024x768, and it will scale all the way from iPad 3 Retina down to iPhone 3gs.
    The other scale mode that is useful is no_border. In that mode you are certain to not have any black borders around the stage. It achieves that by cropping into either the left and right, or the top and bottom, of the stage. See these apps I made, that work that way:
    https://itunes.apple.com/us/app/milkshake-mayhem/id556962979?mt=8
    https://itunes.apple.com/us/app/p.s.-snowflake-yourself/id571384475?mt=8
    In both of those cases I have content that is correct for half way between the ratio limits of 16:9 and 4:3 (or 9:16 and 3:4 for the portrait case). When the app runs on your device, some amount of the left and right, or the top and bottom, of the stage is cropped. I have enough background content for that to be ok, and all of the important content is within the middle 14:9 or 9:14 area of the screen. The stage size for the landscape app is 1680xx1080, exactly 14:9. This approach is better than the show_all one, in that the user doesn't feel like they are seeing a lot of blank space, as can be the case when viewing a 4:3 stage on a 16:9 screen.
    One last thing, even with either of those techniques the app won't fill the iPhone 5 screen. To get that to work you have to include a splash screen that is 640x1136, and name [email protected]. With that in place iOS knows to make your app use the full width or height of the iPhone 5.

  • Leadtek A280 TD (TI-4800SE) Multiple monitor support not available on

    Hello,
    I have a new Leadtek Winfast A280 TD MyVIVO card (TI-4800) on a MSI K7N2G-ILSR (nForce2 motherboard). Completely fresh installation of XP pro with nothing except the nForce 2 motherboard drivers and the latest (43.45)drivers. I know that the internal nForce IGP is disabled when an AGP card is inserted.
    I have two LG 1710S (VGA connector only monitors), both plugged into the A280, one in the VGA port and the other one into the DVI port using a DVI-to_VGA converter.
    The problem is that I cannot use my second monitor at all. When booting it displays a cloned inage, but once in XP the second display (on the DVI) goes blank and stays blank. Nothing I can do with nView or the drivers will make
    it work (or even be detected) in any way at all.
    Three key points:
    1. nView Desktop Manager -> Windows -> Window control is all greyed out.
    2. Desktop -> Properties -> Settings shows only one monitor with none of the 'Extend my windows desktop' options one normally sees with dual head cards.
    3. Desktop -> Properties -> Settings -> Advanced -> GeForce -> nView display mode ->nView modes only the Standard (Dualview) option is available and the graphic shows only one screen.
    I am reasonably experienced with multiple monitors having used Matrox cards for years and setup a nice little Shuttle SN42G dual monitor system using the same nVidia drivers. So I am fairly sure I've not overlooked a setting somewhere.
    BIOS is all fully up to date (1.3) and XP SP1 is applied. The card works fine in 3D games and everything, but just does not seem to realise it has a second monitor.
    *** KEY POINT ***
    I am worried that the MSI K7N2G-ILSR motherboard is somehow preventing the support of dual monitors with my A280 card in WinXP because it itself does not support dual monitors with the IGP. This may not be true, but I have to post my experience into this forum.
    *** KEY POINT ***
    Thanks,
    James Burton

    Okay. I figured out what was going wrong. Nothing to do with the MSI or the motherboard but it is of interest to anyone wanting dual monitor on two LCD flat screens.
    It turns out that the A280 graphics card (and probably other nVidia cards) do not detect LCD monitors (at least by default) in the secondary position.
    This was verified when I connected an normal CRT as secondary an it all wored fine.
    Further discussions will be posted in the nVidia newsgroup for those interested
    James Burton

  • Wanting to use multiple monitors on HP hpe210Y w-DVI-I and HDMI. Audio: 5.1 Surround

    I have a HP Elite hpe210y with only two outputs of which are: 1) DVI-I and 2) HDMI. My  situation is that I have 2 new HP Monitors with VGA Cables. I have an adapter for DVI-I to VGA and also VGA to Dual VGA. I do NOT want the monitors to work as Duplicates however. I want the second monitor to be an extension. I am also interested in getting even 2 more monitors in teh near future for a total of 4.
    Is there some way I can get two monitors to work off one DVI-I ?
    Will I be able to upgrade to up to 4 monitors? 
    Is there a part I need?
    Wanted to mention that my OS is Win7 Home Premium 64 bit. I use IE9, Chrome and Firefox
    I would of never bought this from Best Buy if I had known in advance that there was just the one regular output. I see they have one called a Phoenix which I may look into.
    Thank you in advance for your time and consideration.

    >Is there some way I can get two monitors to work off one DVI-I ?
    I've not yet seen a solution for that.
    You can use a hdmi2vga adapter for the second port.
    >Will I be able to upgrade to up to 4 monitors?
    >Is there a part I need?
    you can try one of these:
    http://www.evga.com/products/pdf/100-U2-UV19-TR.pdf
    http://www.amazon.com/Kensington-Universal-Multi-Display-Adapter-Black/dp/B002F9NSMQ/ref=pd_cp_e_1
    http://aluratek.com/usb-2-0-high-resolution-vga-adapter
    They will use your current graphics device.
    If you are looking for a new solution - I've read about DisplayPort version 1.2 that can do 'daisy-chain connection' with multiple monitors. But this you have to 'google' yourself.
    HTH
    V.
    *** Say 'Thanks' with Kudos ***

  • Find monitor instance name , device name , resolution and frequency of multiple monitors (VGA and HDMI)

    hi,
    In my system multiple monitors are connected (VGA and  HDMI). In need to know the
    monitor instance name , device name , resolution and frequency of each monitor.. any solution?
    i used wm class 'WmiMonitorConnectionParams'  to determine Video output technology connection type and InstanceName.
    But i didn't get the device name , resolution and frequency of each monitor.??
    There are other wmi class like :
    WmiMonitorBrightnessEvent 
    WmiMonitorConnectionParams 
    WmiMonitorRawEEdidV1Block 
    WmiMonitorListedFrequencyRanges 
    WmiMonitorDigitalVideoInputParams 
    WmiMonitorAnalogVideoInputParams 
    WmiMonitorID 
    WmiMonitorBrightnessMethods 
    WmiMonitorBasicDisplayParams 
    WmiMonitorColorCharacteristics 
    WmiMonitorDescriptorMethods 
    WmiMonitorListedSupportedSourceM… 
    WmiMonitorBrightness 
    WmiMonitorColorXYZinCIE 
    WmiMonitorSupportedDisplayFeatures
     WmiMonitorBasicDisplayParams
     Win32_VideoController
    Win32_VideoConfiguration
    Win32_VideoSettings Win32_DisplayControllerConfiguration
    Win32_DisplayConfiguration
    But unable to determine monitor having  its corresponding values? please help me to find a solution .
    is there any other method to get multi monitor details?
    thank  you

    Hi sumith,
    I read some documents about WmiMonitorConnectionParams class, it should be able to get the video putput technology by the D3DKMDT_VIDEO_OUTPUT_TECHNOLOGY enumeration.
    D3DKMDT_VIDEO_OUTPUT_TECHNOLOGY enumeration
    So what happens when you are using WmiMonitorConnectionParams class? What prevent you? Anyway, please see a example of using WmiMonitorConnectionParams class, maybe you could get some hints on it.
    http://stackoverflow.com/questions/10085900/querying-wmi-for-d3dkmdt-video-output-technology
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Win8.1-TV Monitor resolution need 1360x768 only allow 1280x720 & 1920x1080! Works fine in Win7!

    Win8.1-TV Monitor resolution, need 1360x768 only allow 1280x720 & 1920x1080! Works fine in Win7!
    I replace my win7 pc with a win8.1 pc. the TV monitor I was using with Win7 worked fine with 1360x768 resolution, however I don't have that choice with the Win8.1. I tried for months now with default & custom settings. I think is that Win8.1 sees the
    display as Funai TV (Sylvania) where as Win7 as the Intel video display driver.
    Some suggest edit the monitor.ini, not sure if that will work!
    Any help is appreciated!

    Hi, ecscomp,
    Based on my research, the resolution of second monitor should be managed by PC's graphic card driver, not Windows. That's to say, if the graphic card driver doesn't had a correspond setting to change display resolution settings, I'm afraid we have no way
    to change the resolution to 1366x768.
    Thanks for your understanding.
    Roger Lu
    TechNet Community Support

  • HT2589 We have purchase 5 apple minis and would like them all on one account.  That way we can monitor the use of these units.  they will be used strickly for a business application.  can I use one account in itunes or must i have multiple.

    We have purchased 5 apple minis and would like them all on one account, that way we can monitor the use of these units.  They will be used strickly for a business application.  Can I use one account in itunes or must i have multiple.

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • New feature request: Having the possibility to use different keyboard language on multiple monitors.

    I would love to see a new feature to allow the use of different keyboard language on multiple monitors with the same desktop mac.
    Ex.: On dual monitor desktop, use english keyboard on the left screen and french keyboard on the right screen.
    So I wouldn't have to switch keyboard language all the time!
    Thanks.

    You're not speaking to Apple here only other users like yourself.
    Your request should be directed to Apple - Mac OS X - Feedback
    regards

  • Hi! hooked up my new macbook pro to my LGE2442 monitor using a MDP to HDTV cable and the monitor resolution is terrible. suggestions? thanks!

    hi! hooked up my new macbook pro to my LGE2442 monitor using a MDP to HDTV cable and the monitor resolution is terrible. suggestions? thanks!

    thanks, guys mirror on/off didn't make a difference and there were no resolution options with the cable. switched to a VGA adaptor and all is working great now! cheers

  • How can use full app with multiple monitor

    in Lion and Mountain Lion
    when i use Multiple Monitors and move any app in full-screen mode
    its become in one monitor and other monitor become blank
    but it seems usefull that other monitor show another app in fullscreen mode
    how can i do this ?
    and sorry for my bad english!!

    Sorry to say, but it is designed to work that way.
    The only way around it that I know of is, not to use full-screen but just fill the screen with the application that you are using.
    A

  • Auto-Detect Screen Resolution Does Not Work Across Multiple Monitors With Different Resolutions

    Hi,
    The Acrobat Pro DC (15.007.20033.2203) auto-detect screen resolution feature does not work with multiple monitors at different resolutions.  Acrobat looks fine on my hidpi primary laptop display (Razr 14" 2014) but is completely unusable if I drag or extend the application to a standard HD resolution secondary monitor. Dragging Acrobat from my primary desktop display to the secondary display causes the UI elements to become 2x as large as they should be and makes Acrobat unusable. 
    Is there a way to make Acrobat auto-detect the display that it is currently on? 
    Thanks!
    -Donald

    To prevent it from happing again, you can
    1. go to the Mouse preference and turn off the scroll zoom feature.
    2. go to the Universal Access preference and disable the zoom features.

  • When I open a pdf file, after a few seconds, it hides the toolbar and I don't know how to get it back.  I use multiple monitors and, without being able to grab the toolbar, I am unable to move the pdf file to a different monitor.  How do I stop this?

    When I open a pdf file, after a few seconds, it hides the toolbar and I don't know how to get it back.  I use multiple monitors and, without being able to grab the toolbar, I am unable to move the pdf file to a different monitor.  How do I stop this?

    Does Firefox switch to full screen if you press F11 ?
    You can also try the F10 key to see if that brings up the menu bar.
    * If the above steps didn't help then see http://kb.mozillazine.org/Corrupt_localstore.rdf
    Note: Do not delete localstore.rdf in the program folder (Windows: "C:\Program Files\Mozilla Firefox\defaults\profile\") (Mac: "/Applications/Firefox.app/defaults/profile/")

  • Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset wi

    Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset wi

    Got the "apple firewire ntsc" choice to show up even if grayed out and "missing" under "audio/visual" menus by recreating choices in Easy Setup under "final cut pro" MENU thank GOODNESS because I was reading horror stories on here about this under another thread with someone trashing preferences, reinstalling and the works and still not getting it to show up...on my search now for an analog/digital converter up at b&h...find it odd that the s video connector wouldn't show the crt monitor when I put both displays through the 3870...I switched it back to see if it worked again when only the one dell monitor display was there and there it is again mirroring the screen display on my desktop...just can't be seen as an "external monitor" in fcp...couldn't find anything specific in the shane ross threads to this. I'm sad the program doesn't just see the s video connection though the 3870 though my computer does fine and will query up at b&h in regard to what might be affordable as far as a digital/analog converter. It's also weird in itself that when I put the two dell monitors on the one card my computer no longer could see the s video crt connection...makes no sense. Will report in later as to what I discover up at b&h as I'm sure there's a world of people out there using this sony crt monitor still even into the upgrades with computers and software so I imagine therein lies the solution. Thanks again and I'll report in as to what hardware might be suggested for me.

  • How to use different wallpapers on multiple monitors with Linux

    Umm...ok. I use XFCE4 as my DM. It allows me to have a different wallpaper on each desktop.
    Though I'm not interested in other DMs, what DMs would require that I use this third party tool?

    If you have multiple monitors and run Linux, you may want to display different images as your wallpaper on each monitor. There's a utility for that – Nitrogen. The blackMORE Ops blog has a nice how-to on getting Nitrogen and configuring it, with step-by-step instructions and plenty of screenshots.
    This topic first appeared in the Spiceworks Community

Maybe you are looking for

  • Images pixelated in iDVD main screen

    hi all, i create an annual dvd with slideshows and videos. this is my 8th one and i've never had this problem before! i'm using the idvd them "portfolio". when i first started populated the drop zones, everything was fine. the photos i'm using are hi

  • Living with the Mac OS 9

    Hello every one, I have another question, I am truely a Mac fan now. Ok, So I want to live with Mac OS 9 when I get the PowerBook G3, I think Mac OS 9 looks really good and runss really good on the 400MHZ and 256Mb PowerBook, minimun requirements onl

  • Airport connection problems after software update

    I cannot connect to a Wi-Fi network I have been using for days. This happened after installing software updates for quicktime, itunes, airport extreme, safari and Security Update 2008-002. When i run network diagnostics, it tells me this network need

  • Weblogic can't  run on windows2000

    i am new to weblogic,i downloaded an evaluation version of weblogic6.1 for windows,i install it keeping up with the installatoin wizard,after that,select start->program->weblogic6.1->start default server,the dos windows appear,i can see the process i

  • Dreamweaver CC splash screen file error.

    Hi, since completing the recent update for Dreamweaver CC, I have found the splash screen does not appear when I boot up Dreamweaver and I get the following message appear: FILE NOT FOUND: Dreamweaver could not find the file: "file:///MACOS%20/Applic