home *** CD-ROM | disk | FTP | other *** search
- @echo off
- rem ***********************************************************************
- rem * DMCHECK by Jean-Serge Gagnon (az589@freenet.carleton.ca) *
- rem * This file TRYME.BAT by Jean-Serge Gagnon also. *
- rem ***********************************************************************
- rem * Check ftp.cdrom.com or the Synapse BBS at (819) 246-2344 for the *
- rem * latest version. *
- rem ***********************************************************************
- cls
- echo
- echo
- echo
- echo This batch program will use all of the features of DMCHECK to show you how
- echo it is used.
- echo
- echo
- echo
- echo
- echo 1- Start at the DOOM version test.
- echo
- echo 2- Go to the Disk space test.
- echo
- echo 3- Go to the COMMAND.COM test.
- echo
- echo X- Go directly to the end text.
- echo
- echo ESC- Quit straight to DOS!
- echo
- echo
- dmcheck /q ask "Select from the above menu: " 123X
- cls
- if errorlevel == 255 goto totalend
- if errorlevel == 4 goto end2
- if errorlevel == 3 goto comtest1
- if errorlevel == 2 goto nowhich
- if errorlevel == 1 goto start
- echo Opps, I got a weird happening while doing the MENU function.
- goto mail
- :start
- echo I will now execute the following command:
- echo
- echo DMCHECK WHICH /Q
- echo
- echo This will check the installed DOOM version and return an ERRORLEVEL code
- echo describing the version installed. The /Q switch prevents the display of the
- echo DMCHECK text. After the execution of DMCHECK, the batch file will execute
- echo code based on that ERRORLEVEL code to indicate the version...
- echo
- dmcheck w /q
- if not errorlevel == 255 goto not255
- echo No DOOM version found!
- goto end
- :not255
- if not errorlevel == 31 goto not31
- echo You have a modified copy of DOOM 1.2 called the SYBEX version 1.25.
- goto end
- :not31
- if not errorlevel == 30 goto not30
- echo You have a modified copy of DOOM from the PC-ZONE CDROM! It is like ver 1.2
- echo but with a modified EXE file.
- goto end
- :not30
- if not errorlevel == 26 goto not26
- echo You have a more recent version than 1.9 of DOOM ][.
- goto end
- :not26
- if not errorlevel == 25 goto not25
- echo DOOM ][ ver 1.9
- goto end
- :not25
- if not errorlevel == 24 goto not24
- echo DOOM ][ ver 1.8
- goto end
- :not24
- if not errorlevel == 23 goto not23
- echo DOOM ][ ver 1.7a
- goto end
- :not23
- if not errorlevel == 22 goto not22
- echo DOOM ][ ver 1.7
- goto end
- :not22
- if not errorlevel == 21 goto not21
- echo DOOM ][ ver 1.666
- goto end
- :not21
- if not errorlevel == 19 goto not19
- echo You have the a pirated copy of DOOM ][! Shame on you!!!
- goto end
- :not19
- if not errorlevel == 11 goto not11
- dmcheck v 1.9 /q
- if not errorlevel == 1 goto ok9
- echo Version 1.9 of DOOM 1 sharewear.
- goto end
- :ok9
- echo Version 1.9 of DOOM 1 registered.
- goto end
- :not11
- if not errorlevel == 10 goto not10
- dmcheck v 1.8 /q
- if not errorlevel == 1 goto ok8
- echo Version 1.8 of DOOM 1 sharewear.
- goto end
- :ok8
- echo Version 1.8 of DOOM 1 registered.
- goto end
- :not10
- if not errorlevel == 9 goto not9
- dmcheck v 1.7a /q
- if not errorlevel == 1 goto ok7a
- echo Version 1.7a of DOOM 1 sharewear.
- goto end
- :ok7a
- echo Version 1.7a of DOOM 1 registered.
- goto end
- :not9
- if not errorlevel == 8 goto not8
- dmcheck v 1.7 /q
- if not errorlevel == 1 goto ok7
- echo Version 1.7 of DOOM 1 sharewear.
- goto end
- :ok7
- echo Version 1.7 of DOOM 1 registered.
- goto end
- :not8
- if not errorlevel == 7 goto not7
- dmcheck v 1.666 /q
- if not errorlevel == 1 goto ok6
- echo You have version 1.666 all right, but it's the shareware version!
- goto end
- :ok6
- echo Since you have DOOM 1.666, then the PWAD should be executed with
- echo DOOM -FILE FOREST.WAD DEMO12.WAD, otherwise DOOM would tell you
- echo that the demos were not for ver 1.666 and would exit.
- goto end
- :not7
- if not errorlevel == 6 goto not6
- echo DOOM 1.6 beta, this is only a shareware verison.
- goto end
- :not6
- if not errorlevel == 5 goto not5
- echo DOOM 1.5 beta, this is only a shareware version.
- goto end
- :not5
- if not errorlevel == 4 goto not4
- echo DOOM 1.4 beta, only shareware.
- goto end
- :not4
- if not errorlevel == 3 goto not3
- echo Since you have DOOM 1.2, then we could run a PWAD made for it instead of
- echo displaying this.
- dmcheck /q v 1.2
- if not errorlevel == 1 goto end
- echo but since you have the shareware version, we still can't.
- goto end
- :not3
- if not errorlevel == 2 goto not2
- echo Somebody that has DOOM 1.1 would get a message saying that the
- echo PWAD isn't usable with that version and he should upgrade to 1.2
- dmcheck /q v 1.1
- if not errorlevel == 1 goto end
- echo Also, this is only the shareware of 1.1, sorry can't do much!
- goto end
- :not2
- if not errorlevel == 1 goto not1
- echo And for DOOM 1.0, you have to upgrade to 1.1, then 1.2 and today 1.666!
- dmcheck /q v 1.0
- if not errorlevel == 1 goto end
- echo on top of that, this is the first shareware release of DOOM!
- goto end
- :not1
- echo Oops got an errorlevel of 0 which shouldn't happen!
- :mail
- echo Please send e-mail to me (Jean-Serge Gagnon) at az589@freenet.carleton.ca
- echo and tell me about it. Thanks.
- goto totalend
- :end
- pause
- cls
- :nowhich
- echo
- echo
- echo ******** new features of DMCHECK *********
- echo
- echo Since version 3.0 of DMCHECK, there are two new functions that will make
- echo it easier for batch files. For example, let's say that you have a PWAD that
- echo works only with ver 1.0 of DOOM and you tested for it with the VERSION function
- echo found that it wasn't the installed version, instead of writing a long
- echo batch file to test for each of the possible ERRORLEVEL codes, you could
- echo just use the WHICH function with the /M and /U switches and have an echo line
- echo like this code:
- echo
- echo ECHO I'm sorry, I do not support
- echo DMCHECK WHICH /M /U
- echo
- echo which would result in the following output...
- echo
- echo I'm sorry, I do not support
- dmcheck w /m /u
- echo
- echo Pretty nice, eh!
- pause
- cls
- echo
- echo OK, now let's try the S[pace] function. We will test to see if there is
- echo more than 10,000,000 bytes free on a drive, but first, let's give the A[sk]
- echo function a try...
- dmcheck /q ask "Which drive to test [C-F]? " CDEF
- if not errorlevel == 255 goto nota255
- echo You pressed [Escape], I guess we can forget about this test!!!
- goto end2
- :nota255
- if not errorlevel == 4 goto nota4
- echo Testing drive F:...
- echo --------- DMCHECK displays this when used with /d parameter ----------
- dmcheck space /d f 10,000,000
- if errorlevel == 255 goto driverror
- goto cont
- :nota4
- if not errorlevel == 3 goto nota3
- echo Testing drive E:...
- echo --------- DMCHECK displays this when used with /d parameter ----------
- dmcheck space /d e 10,000,000
- if errorlevel == 255 goto driverror
- goto cont
- :nota3
- if not errorlevel == 2 goto nota2
- echo Testing drive D:...
- echo --------- DMCHECK displays this when used with /d parameter ----------
- dmcheck /d s d 10,000,000
- if errorlevel == 255 goto driverror
- goto cont
- :nota2
- if not errorlevel == 1 goto nota1
- echo Testing drive C:...
- echo --------- DMCHECK displays this when used with /d parameter ----------
- dmcheck space /d c 10,000,000
- if errorlevel == 255 goto driverror
- goto cont
- :driverror
- echo
- echo ----------------------- end of DMCHECK text -----------------------------
- echo Sorry, either there was an error accessing the drive or you simply don't
- echo have that drive installed!
- goto comtest
- :nota1
- echo Opps, I got a weird happening while doing the Ask function.
- goto mail
- :cont
- echo
- echo ----------------------- end of DMCHECK text -----------------------------
- if errorlevel == 1 goto nofree
- echo There is at least 10,000,000 bytes free on the requested drive.
- goto comtest
- :nofree
- echo There is less than 10,000,000 bytes on the requested drive, sorry!
- :comtest
- pause
- :comtest1
- cls
- echo Now, let's use the F[ile] funcion to test the file size, data and time of
- echo the file C:\COMMAND.COM. This can be used to test for a DOOM version that
- echo DMCHECK doesn't know about yet or some other use...
- dmcheck file c:\command.com/q 47845 05-30-91 12:00:00
- echo
- if not errorlevel == 255 goto n255
- echo You do not have any COMMAND.COM file in C:\!
- goto end2
- :n255
- if not errorlevel == 1 goto n1
- echo You do not have the same version of MS-DOS than me!
- goto end2
- :n1
- echo You have the COMMAND.COM file for MS-DOS 5.0 in the root of drive C:.
- :end2
- echo
- echo There are many things that can be done with DMCHECK if used properly. You
- echo could check for the existance of the first release of DOOM ][ and tell the
- echo user that it may be a pirated copy. You could also check that the version
- echo of DOOM that is installed is a shareware copy and display a message
- echo explaining that the user needs to have the registered copy of DOOM to use
- echo your PWAD file, instead of having people send you e-mail or phone you
- echo asking things like that. People want easy things to do, and DMCHECK makes
- echo it that much simpler to use PWAD files for the end-user without having to
- echo learn anything else than typing in a batch file name at the DOS prompt!
- echo
- echo Jean-Serge Gagnon (az589@freenet.carleton.ca)
- :totalend
-