@echo off
rem this batch file sets the following dos variables
rem Var    Description       Value(s)
rem ------ --------------    --------
rem dosver DOS version       5,6 
rem color  screen color      m,c 
rem word   Win or Dos        w,d  (w if windows is installed, d if DOS only)

cls

set dosver=
set color=
set slots=0
set word=

c:
cd\
if not "%dosver%"=="" goto dosdone
if not "%1"=="ask" goto dodos
input "Are you running on top of DOS 6?"
if not errorlevel 1 goto dos5
goto dos6

:dodos
ver >c:\vers
a:chkstr vers 6.
if not errorlevel 1 goto dos5

:dos6
set dosver=6
if exist c:\windows\*.* set word=w
if not exist c:\windows\*.* set word=d
goto dosdone

:dos5
set dosver=5
set word=
:dosdone

if exist c:\vers del c:\vers >NUL


if not "%color%"=="" goto color_done
input "Does your computer have a color display?"

if not errorlevel 1 goto mono
set color=c
goto color_done

:mono
set color=m
:color_done

goto exit

:exit

