Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for getres.bat

(view source code of getres.bat as plain text)

  1. @ECHO OFF
  2. :: GetRes.bat,  Version 1.00 for Windows NT 4
  3. :: Get display resolution settings
  4. :: Written by Rob van der Woude
  5. :: http://www.robvanderwoude.com
  6.  
  7. VER | FIND "Windows NT" > NUL
  8. IF ERRORLEVEL 1 GOTO:EOF
  9.  
  10. ECHO.
  11. SET LINES=0
  12. FOR /F "TOKENS=2* DELIMS=." %%A IN ('REG QUERY "HKCC\System\CurrentControlSet\Services" /S') DO CALL :Display %%A
  13. GOTO:EOF
  14.  
  15. :Display
  16. IF %LINES%==4 GOTO:EOF
  17. ECHO %* | FIND "BitsPerPel"
  18. IF NOT ERRORLEVEL 1 SET /A LINES = %LINES% + 1
  19. ECHO %* | FIND "Resolution"
  20. IF NOT ERRORLEVEL 1 SET /A LINES = %LINES% + 1
  21. ECHO %* | FIND "Refresh"
  22. IF NOT ERRORLEVEL 1 SET /A LINES = %LINES% + 1
  23. GOTO:EOF
  24.  

page last modified: 2024-04-16; loaded in 0.0071 seconds