Windet.com is a small command line utility that allows you to test for the
presence of Windows in a batch file by using standard DOS errorlevel codes.
You can test for the presence of Windows 3.1x, 95, 98, Millennium, NT/2000
or even the DOS version number if the batch file is running under true DOS.
The DOS version detection is limited to returning only the actual DOS major
version number that is reported by the operating system.

Windet returns the following errorlevel codes:

31 = Windows 3.1x
95 = All versions of Windows 95
98 = All versions of Windows 98
200 = Windows Millennium
201 = Windows NT or Windows 2000

3 to 8 = DOS major version number


I originally wrote this program because I wanted to use the excellent XCOPY
replacement XXCOPY under both Windows and DOS without having to type in the
name of the DOS version (XXCOPY16) when running under true DOS. Almost every
time I used it under DOS I found myself forgetting to add the 16 at the end
of the DOS version of XXCOPY.  This prompted me to write a batch file that
would automatically select the correct version of XXCOPY for the operating
system in use. Unfortunately there is no way that I am aware of to reliably
detect the presence of Windows from a batch file. Until now...

For people that are not familiar with DOS errorlevel codes I have included a
batch file example (EXAMPLE.BAT) in this archive. I have also included two
other files in the archive. One is the original batch file that I wrote for
use with XXCOPY and the other is a compiled version of the same batch file.

If you are interested in using XXCOPY yourself you will need to rename the
Windows version of XXCOPY to XXCOPY32.EXE to use it with the compiled batch
file. You could even rename XXCOPY.COM to XCOPY.COM and delete all the XCOPY
files as XXCOPY has all the functionality of XCOPY and much more.


The XXCOPY batch file was compiled with Turbobat.


The XXCOPY home page: http://www.datman.com/xxcopy/




Stephen J Woolham

http://www.geocities.com/sjwoolham/




Disclaimer
----------

Use at your own risk !

