echo off
cls
:HelpCheck

if "%1"=="" goto help

:FloppyCheck

if "%1" == "A:" goto FloppyError
if "%1" == "a:" goto FloppyError
if "%1" == "B:" goto FloppyError
if "%1" == "b:" goto FloppyError

:ShowDrive

set direct=%2
if "%2"=="" set direct=\LOTTOT
cd %1%direct%
cls
echo ÿ
echo                 LOTTO THUNDER INSTALLATION
echo ÿ
if exist %1thunder.exe goto Exists
echo      The selected path for Lotto Thunder is:
echo ÿ
echo                    %1%direct%
echo ÿ
echo      You may see an "Unable to create directory" message if the
echo      directory is already present on your hard drive. This is only a
echo      warning; the installation will continue successfully.
echo ÿ
echo      Press any key to continue the installation or a ^C (the CONTROL
echo      and C keys at the same time) to abort the installation.

pause > nul:

echo ÿ

:Install

md %1%direct%

echo      Please wait, copying files ...

lottot /e%1%direct%
if errorlevel 1 goto CopyError
cd %1%direct%
%1
set direct=
%1
set direct=

echo ÿ
echo      Lotto Thunder   has been installed. Type TRUN at the
echo                  DOS prompt  to start the  program.  

goto Exit

:help

echo      To install Lotto Thunder on your hard drive type A:
echo      or B: to select the floppy drive containing the Lotto Thunder
echo      distribution disk. Press a carriage return to select this
echo      drive.  Then type INSTALL followed by the hard drive identifier
echo      to receive the program.  For example:
echo ÿ
echo                           A:
echo                           INSTALL C:
echo ÿ
echo      The default directory will be LOTTOT. If you would like to change
echo      the default directory, you may enter the new directory after your
echo      drive identifier.  For example:
echo ÿ
echo                           INSTALL C: \PRO
echo ÿ
echo      The SPACE MUST BE PRESENT BETWEEN THE DRIVE AND DIRECTORY or the
echo      install will not complete successfully.
echo ÿ
echo      The installation can be aborted at any time by pressing a ^C (the
echo      CONTROL and C keys at the same time).

goto Exit

:FloppyError

echo      Lotto Thunder  can only be installed on a hard drive.
echo      The  drive  letter must  be  a  hard  drive  identifier.
echo      Please try again using the letter for your hard drive.

goto Exit

:Exists
echo ÿ
echo                            *** WARNING ***
echo ÿ
echo      A  previous  copy  of  Lotto  Thunder   exists on
echo      your hard drive in %1%direct%.
echo ÿ
echo      ALL DATABASE FILES WILL BE PRESERVED ÿ
echo ÿ
echo      You will see an "Unable to create directory" message.  This is
echo      only a warning; the installation will continue successfully.
echo ÿ
echo      Press any key to continue the installation or a ^C (the CONTROL
echo      and C keys at the same time) to abort the installation.
pause > nul:
echo ÿ
echo      One Moment...........Checking HARD-DISK.................

if exist %1thunder.doc del %1thunder.doc
if exist %1register.doc del %1register.doc
if exist %1ombudsmn.asp del %1ombudsmn.asp
if exist %1packing.lst del %1packing.lst
if exist %1vendor.doc del %1vendor.doc
if exist %1sysop.doc del %1sysop.doc
if exist %1describe.doc del %1describe.doc
if exist %1warranty.doc del %1warranty.doc
if exist %1license.doc del %1license.doc
if exist %1sitelice.doc del %1sitelice.doc
if exist %1trun.bat del %1trun.bat
if exist %1thunder.exe del %1thunder.exe
if exist %1thunder.sys del %1thunder.sys
if exist %1read.me del %1read.me
if exist %1thund1.ovl del %1thund1.ovl
if exist %1thund2.ovl del %1thund2.ovl
if exist %1thund3.ovl del %1thund3.ovl
if exist %1thund4.ovl del %1thund4.ovl
if exist %1thund5.ovl del %1thund5.ovl
if exist %1thund6.ovl del %1thund6.ovl
if exist %1thund7.ovl del %1thund7.ovl
if exist %1thund8.ovl del %1thund8.ovl
if exist %1thund9.ovl del %1thund9.ovl
if exist %1thund10.ovl del %1thund10.ovl
if exist %1thund11.ovl del %1thund11.ovl
if exist %1thund12.ovl del %1thund12.ovl
if exist %1thund13.ovl del %1thund13.ovl
if exist %1thund14.ovl del %1thund14.ovl
if exist %1thund15.ovl del %1thund15.ovl
if exist %1thund16.ovl del %1thund16.ovl
if exist %1thund17.ovl del %1thund17.ovl
if exist %1thund18.ovl del %1thund18.ovl
if exist %1thund19.ovl del %1thund19.ovl
if exist %1thund20.ovl del %1thund20.ovl
if exist %1thund21.ovl del %1thund21.ovl
if exist %1thund22.ovl del %1thund22.ovl
if exist %1thund23.ovl del %1thund23.ovl
if exist %1thund24.ovl del %1thund24.ovl
if exist %1thund25.ovl del %1thund25.ovl
if exist %1thund26.ovl del %1thund26.ovl
if exist %1thund27.ovl del %1thund27.ovl
if exist %1thund28.ovl del %1thund28.ovl
if exist %1thund29.ovl del %1thund29.ovl
if exist %1thund30.ovl del %1thund30.ovl
if exist %1thund31.ovl del %1thund31.ovl
if exist %1thund32.ovl del %1thund32.ovl
if exist %1thund33.ovl del %1thund33.ovl
if exist %1thund34.ovl del %1thund34.ovl
if exist %1thund35.ovl del %1thund35.ovl
if exist %1thund36.ovl del %1thund36.ovl
if exist %1thund37.ovl del %1thund37.ovl
if exist %1thund38.ovl del %1thund38.ovl
if exist %1thund39.ovl del %1thund39.ovl
if exist %1thund40.ovl del %1thund40.ovl
if exist %1thund41.ovl del %1thund41.ovl
if exist %1thund42.ovl del %1thund42.ovl
if exist %1thund43.ovl del %1thund43.ovl
if exist %1thund44.ovl del %1thund44.ovl
if exist %1thund45.ovl del %1thund45.ovl
if exist %1thund46.ovl del %1thund46.ovl
if exist %1thund47.ovl del %1thund47.ovl
if exist %1thund48.ovl del %1thund48.ovl
if exist %1thund49.ovl del %1thund49.ovl
if exist %1thund50.ovl del %1thund50.ovl
if exist %1thund51.ovl del %1thund51.ovl
if exist %1thund52.ovl del %1thund52.ovl
if exist %1thund53.ovl del %1thund53.ovl
if exist %1thund54.ovl del %1thund54.ovl
if exist %1thund55.ovl del %1thund55.ovl
if exist %1thund56.ovl del %1thund56.ovl
if exist %1thund57.ovl del %1thund57.ovl
if exist %1thund58.ovl del %1thund58.ovl
if exist %1thund59.ovl del %1thund59.ovl
if exist %1thund60.ovl del %1thund60.ovl
if exist %1thund61.ovl del %1thund61.ovl
if exist %1thund62.ovl del %1thund62.ovl
if exist %1thund63.ovl del %1thund63.ovl
goto Install

:CopyError

echo ÿ
echo      An error occurred creating the specified directory, or copying one
echo      of  the  Lotto   Thunder   files    to   your   hard   disk.    At
echo      least 1.3 megabytes of disk space must  be  available  to  install
echo      Lotto  Thunder.   CHKDSK  can  be  used  to verify that sufficient
echo      space is available.
echo      If you cannot get the install batch file to work. You can copy the
echo      file LOTTOT.EXE  to your  harddisk. Then type LOTTOT  at  the  DOS
echo      prompt to start the self-extracting process.

:Exit

echo ÿ
echo ÿ
