@echo off for /f "delims=" %%i in ('Wmic DesktopMonitor Get ScreenHeight^,ScreenWidth /Value') do set "%%i">nul 2>nul echo %ScreenHeight% %ScreenWidth% pause复制代码