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.
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
And it returns (screenheight/width return current settings):
C:\Users\user>wmic desktopmonitor get name, pixelsperxlogicalinch, screenw
Name PixelsPerXLogicalInch ScreenHeight ScreenWidth
Dell P2312H (Digital) 96 1080 1920