IsWin 1.3 Is the specified file a Windows GUI program? IsWin C:MyProg.Exe If ErrorLevel 3 GoTo Problem If ErrorLevel 2 GoTO IsForWin32 If ErrorLevel 1 GoTo IsForWin16 Goto IsForDos In debugging you might just use to view the errorlevel result. echo %ERRORLEVEL Copyrighted, but may be freely distributed and used for any purpose except military. Works on EXE, COM and DLL files. MASM source included. Version 1.3 adds detection for PKLite DOS exes and Win32 exes.