Skip navigation

JSI Tip 8621. Scrnres.exe freeware displays the screen resolution.

Downloads
scrnres.zip


Download scrnres.zip to print the screen resolution to STDOUT.

When I type scrnres /? in a CMD.EXE window, it displays:

Version 1.0, Copyright (C)2001 Frank P. Westlake
Prints the resolution of the screen to STDOUT.

When I type scrnres, it displays:

1600 X 1200

To capture the screen resolution in an ScreenX and ScreenY environment variable, use the following commands in your batch script:

for /f "Tokens=1,3" %%x in ('scrnres') do (
 set /a ScreenX=%%x
 set /a ScreenY=%%y
)



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish