Created
August 8, 2025 10:46
-
-
Save cptSwing/d0abc0905fc14b6537538e21e5173197 to your computer and use it in GitHub Desktop.
Set different DPI scaling values for extra monitors attached to a laptop, while keeping the laptop's. Requires "SetDPI" (see link below)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @REM path to SetDPI.exe (get from https://github.com/imniko/SetDPI) | |
| set SETDPI_PATH="C:\ProgramData\SetDpi" | |
| @REM How many screens connected? | |
| for /f "delims=" %%a in ('powershell -Command "$m = Get-PnpDevice -Class Monitor -Status OK | measure; $m.Count"') do set "MONITOR_COUNT=%%a" | |
| echo Monitor count : %MONITOR_COUNT% | |
| for /l %%i in (2, 1, %MONITOR_COUNT%) do ( | |
| echo Monitor %%i set to scaling 100 | |
| start "" "%SETDPI_PATH%\SetDpi.exe" "100" "%%i" | |
| ) | |
| @REM Show for 10 seconds | |
| @timeout /t 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment