Rotate Desktop Shortcut |best| Review
@echo off setlocal enabledelayedexpansion :: Path to display.exe - change if needed set DISPLAY="C:\Tools\Display.exe"
Note: /getrotation may not work with all versions. Alternative: Use a small temp file to track state. rotate desktop shortcut
if "%curr%"=="0" ( %DISPLAY% /rotate 90 ) else if "%curr%"=="90" ( %DISPLAY% /rotate 180 ) else if "%curr%"=="180" ( %DISPLAY% /rotate 270 ) else ( %DISPLAY% /rotate 0 ) @echo off setlocal enabledelayedexpansion :: Path to display
Create a new text file on desktop → rename to RotateCycle.bat %statefile% set /p state=<
@echo off set statefile=%temp%\rotstate.txt if not exist %statefile% echo 0 > %statefile% set /p state=<%statefile% if %state%==0 ( C:\Tools\Display.exe /rotate 90 echo 1 > %statefile% ) else if %state%==1 ( C:\Tools\Display.exe /rotate 180 echo 2 > %statefile% ) else if %state%==2 ( C:\Tools\Display.exe /rotate 270 echo 3 > %statefile% ) else ( C:\Tools\Display.exe /rotate 0 echo 0 > %statefile% )
Right-click → Edit → paste this:
:: Get current rotation (requires a helper or manually track) :: Simpler: cycle hardcoded for /f %%a in ('%DISPLAY% /getrotation') do set curr=%%a
