Get the max screen resolution via CLI


I need just the following:

How can I decide from CLI what is the max screen resolution of the system I am on.

I don't need the current resolution or how to set it, this is clear, but the max (or better: native) resolution of a LCD.

OS: Windows 7, Windows 8, x64

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: jknox 8 years ago
Red Belt

I can't think of a way to get the actual native resolution, but you can use a command like this to get pixel density:

C:\Users\user>wmic desktopmonitor get pixelsperxlogicalinch

Then, use the "Commercial Displays" list here to compare: http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density

So by that list, 96 pixels is a 16:9 display that can do 1920x1080.

There are other options in the wmic command like MonitorManufacturer that could be used, but I think that needs that the proper monitor driver is installed in order to return the correct information.

For instance, I used this:  wmic desktopmonitor get name, pixelsperxlogicalinch, screenw
idth, screenheight

And it returns (screenheight/width return current settings):

C:\Users\user>wmic desktopmonitor get name, pixelsperxlogicalinch, screenw
idth, screenheight
Name                   PixelsPerXLogicalInch  ScreenHeight  ScreenWidth
Dell P2312H (Digital)  96                     1080          1920

  • Yeah, I know, these results are nice but not really that, what I need (as I wrote, I know these values already) But I am fine with: there is no way to get this - Nico_K 8 years ago
    • Pixel density (PixelsPerXLogicalInch) would help determine the maximum resolution on a LCD monitor, just not in an easy to use fashion.

      The trouble with it is though, that if there are multiple resolutions with the same pixel density, you may see results that aren't correct. - jknox 8 years ago
  • So far, for Windows, this is the only program that I've found that will read the EDID info directly from the monitor:

    Monitor Asset Manager (Free for personal use)

    A free command line program you can use to read the EDID from the Windows registry is:

    DumpEDID v1.01

    The problem with reading from the Windows registry is often, there will be old computer monitors that are still there, because they were not uninstalled before they were removed. In the output there is a field "Maximum Resolution."

    I am researching to see if there is a way to read the monitor EDID with Nvidia/Ati's utilities. - flip1001 8 years ago
    • This one appears to be able to run from the command line and output to a couple of different file types. http://www.nirsoft.net/utils/monitor_info_view.html

      It also can disregard non-active monitors:

      MonitorInfoView.exe /HideInactiveMonitors 1 /stext C:\Users\user\Desktop\monitorinfoview\monitor.txt

      That returns a file called "monitors.txt" and you can use a "Find" like this:

      C:\Users\user\Desktop\monitorinfoview>Find "Maximum Resolution" monitor.txt

      ---------- MONITOR.TXT
      Maximum Resolution: 1920 X 1080
      Maximum Resolution: 1920 X 1080 - jknox 8 years ago
      • I wrote up something similar as a K1000 managed install: http://www.itninja.com/blog/view/k1000-use-a-third-party-program-in-a-managed-install-to-return-a-monitor-s-model-and-serial-number - jknox 7 years ago
  • Fantastic, I will use that program for a KACE custom inventory rule for Monitor and Serial # - flip1001 8 years ago
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ