Windows, Command-Line – Get Display Resolution from Windows Command Line

command linecygwin;displayresolutionwindows

I have seen several suggestions about programs to change the resolution from the command line. However I just want to display it, not change it.

On linux I can use xrandr or xdpyinfo to get this info, so I am looking for something like that.

I also need it to work within a cygwin shell.

Best Answer

Try this:

wmic desktopmonitor get screenheight, screenwidth

From within Cygwin:

cmd /c wmic desktopmonitor get screenheight, screenwidth

I'm not sure what tricks to use in order to use the output. Perhaps a temporary text file?

Related Question