Не для всех видеокарт работает
Цитата Foreigner:
@echo off
setlocal
set "wmic=wmic desktopmonitor get screenwidth, screenheight /value"
for /f %%i in (' "%wmic%" ') do 1>nul set "%%i"
if "%screenwidth%x%screenheight%"=="1680x1050" start "" "notepad"
if "%screenwidth%x%screenheight%"=="1024x768" start "" "calc" »
|
А вот такой работает у меня везде
@echo off
setlocal
set "wmic=wmic desktopmonitor where 'ScreenWidth!=null and ScreenHeight!=null' get screenwidth, screenheight /value"
for /f %%i in (' "%wmic%" ') do 1>nul set "%%i"
if "%ScreenWidth%x%ScreenHeight%"=="1680x1050" start "" "notepad"
if "%ScreenWidth%x%ScreenHeight%"=="1024x768" start "" "calc"