if "%curr%"=="0" ( %DISPLAY% /rotate 90 ) else if "%curr%"=="90" ( %DISPLAY% /rotate 180 ) else if "%curr%"=="180" ( %DISPLAY% /rotate 270 ) else ( %DISPLAY% /rotate 0 )
Note: /getrotation may not work with all versions. Alternative: Use a small temp file to track state. rotate desktop shortcut
@echo off setlocal enabledelayedexpansion :: Path to display.exe - change if needed set DISPLAY="C:\Tools\Display.exe" if "%curr%"=="0" ( %DISPLAY% /rotate 90 ) else