(view source code of getres.bat as plain text)
@ECHO OFF
:: GetRes.bat, Version 4.00 for Windows XP:: Get display resolution settings:: Written by Rob van der Woude:: http://www.robvanderwoude.com:: Search the registry tree for the required valuesSET Key=HKCC\System\CurrentControlSet\Control\VIDEO
FOR /F "skip=5 tokens=*" %%A IN ('REG QUERY "%Key%"') DO (
FOR /F "skip=5 tokens=*" %%B IN ('REG QUERY "%%~A"') DO (
FOR %%C IN (BitsPerPel XResolution YResolution VRefresh) DO (
FOR /F "skip=4 tokens=*" %%D IN ('REG QUERY "%%~B" /v DefaultSettings.%%C') DO (
CALL :Display %%D
) )ECHO.
))SET Key=
SET Val=
SET __Video.
GOTO:EOF
:Display:: Convert hexadecimal values to decimalSET /A Val = %3
:: Display the result AND store the "last" values in variablesFOR /F "tokens=2 delims=." %%a IN ('ECHO.%1') DO (
ECHO.%%a %Val%
SET __Video.%%a=%Val%
)GOTO:EOF
page last modified: 2025-10-11; loaded in 0.0075 seconds