@Echo off rem For logon script. Permits you to remotely determine Win2k v. WinNT v. Win9x :DOSCheck if "%Windir%" == "" goto DOS goto 9XCheck :DOS Echo DOS goto end :9XCheck if "%OS%" == "Windows_NT" goto NT Echo Windows 9x goto end :NT set userprofile > %temp%\$$uprofile.tmp find /i "Documents" %temp%\$$uprofile.tmp > nul if errorlevel == 1 goto not2k goto W2k :not2k Echo WinNT 3.x or 4.x goto end :W2k Echo Windows 2000 goto end :end if exist %temp%\$$uprofile.tmp del %temp%\$$uprofile.tmp pause