SCREENRES — Display or change the screen resolution.

Syntax:
SCREENRES /A /C:bits /D /L /M:monitor /NR /Q /R:rate /X:width /Y:height

/Ashow resolution for all monitors
/C:bitschange the color depth
/Ddon’t save new settings in the registry
/Llist available display modes
/M:monitorzero-based number of the monitor to display or change
/NRno report on a successful change
/Qdo not prompt for confirmation when making changes
/R:ratechange the refresh rate
/X:widthchange the display width
/Y:heightchange the display height

Specifying any of /C:bits, /R:rate, /X:width, or /Y:height will change the display settings. If you use /X:width you should also supply a /Y:height, and vice versa. If you don’t supply a /M:monitor, the primary monitor will be changed.

If you make any changes to the display settings without specifying /Q, SCREENRES will prompt you to enter a random three-digit number to verify that you can still read the display. If you don’t enter the same number within fifteen seconds, the display will revert to its previous settings.

rem  Set the primary monitor to 1280 by 1024 pixels:
screenres /x:1280 /y:1024


Option /L will cause SCREENRES to list available display modes, instead of setting or displaying the current mode. The primary monitor will be shown by default, unless you specify a different one with /M:monitor or use /A to list available modes for all monitors. If you combine /L with any of /X:width, /Y:height, /C:bits, or /R:rate, the list will only include modes matching the specified values. Note that just because a display mode is listed as available does not mean that your monitor is capable of displaying it!


See also: the @SCREENRES function, which returns information about the current display settings.