Use the return code of the DOS command ISWINDOW to distinguish between
windowed and fullscreen DOS session (0 = fullscreen, 1 = window).
Example:
@ECHO OFF REM *** sample DOS batch to distinguish REM between window and fullscreen REM --- call the util program iswindow if errorlevel 1 goto IsWin :IsFS SET sessionType=FS ECHO. Running in a DOS Fullscreen session GOTO NEXT :IsWin SET sessionType=WIN ECHO. Running in a DOS window session :NEXT