#SETUP.DTA, Updated 6/2/96
BANNER " College Aid Calculator 96-7 (TM) ... Copyright 1996"

:VARIABLES
SET %DiskSpaceNeeded "10000000"
SET %BOOT "C:"
SET %DestExe "C:\COL_AID"
SET %DATEFMT "American"
SET %NUMFMT "American"
SET %CURNAME "Dollars"
SET %CURSYM "$"
SET %DATESEP "/"
SET %ShareMode "MULTI"
SET %NoSh ""
SET %Set "s"
SET %WinPath "C:\WINDOWS"
SET %chc "X"

:GREETING
MSG "WELCOME to College Aid Calculator" "" "This is the 1996-7 school year version." "" "You MAY copy this program!" "" "Pass CAC along to friends with college in their future."
IF EQUAL %Source "C:\COL_AID"
  MSG "NOTE: If you are installing CAC from the COL_AID directory," "   copy all of the files to two disks before continuing" "       so you'll have a backup or a copy to give to a friend." "" "(SETUP deletes itself when run from the COL_AID directory.)"
ENDIF

:MAINMENU
MENU %InstallMenuSel "Install College Aid Calculator;Exit to DOS""Installation Options"
IF EQUAL %InstallMenuSel "Exit to DOS"
  ASK %EXIT "Are you sure you want to exit to DOS?"
  IF YES %EXIT
    END
  ENDIF
  IF NO %EXIT
    GOTO MAINMENU
  ENDIF
ENDIF

:OSMENU
MENU %OSMenuSel "        Windows 95        ;Windows 3.1;DOS""Operating System Selection"

IF EQUAL %OSMenuSel "        Windows 95        "
  SET %RunWin "YES"
  GETPATH %WinPath EXISTS "Please enter the directory" "into which you have installed Windows 95."
  GOTO CHECKFREE
ENDIF

IF EQUAL %OSMenuSel "Windows 3.1"
  SET %RunWin "YES"
  GETPATH %WinPath EXISTS "Please enter the directory" "into which you have installed Windows."
  GOTO CHECKFREE
ENDIF

IF EQUAL %OSMenuSel "DOS"
  SET %RunWin "NO"
  GOTO CHECKFREE
ENDIF

:CHECKFREE
GETPATH %DestExe CREATE "Please enter the drive and path INTO which you wish to" "install College Aid Calculator 96-7."
DISKSPACE %SPACE %DestExe 10000000
IF NO %SPACE
  BEEP
  ERROR "College Aid Calculator 96-6 can not be installed." "You need 10 MB of free disk space to install College Aid Calculator 96-7," "which is recuced to 6.5 MB after installation."
  END
ENDIF


:COPYFILES
BAT %DestExe\A4.VMC "minmem = 1024" "maxmem = 4096" "virtualsize = 4096" "swapname = %DestExe\A4.SWP"
IF EQUAL %Source %DestExe
  COPY %DestExe\COL_AID.1               %DestExe\COL_AID.ZIP
  PROGRESS 20
  APPEND %DestExe\COL_AID.2             %DestExe\COL_AID.ZIP
  DEL %DestExe\COL_AID.2
  DEL %DestExe\COL_AID.1
  PROGRESS 35
  UNZIP %DestExe\COL_AID.ZIP            %DestExe\ *.*
  PROGRESS 65
  DEL %DestExe\COL_AID.ZIP
  UNZIP %DestExe\BOOKS.ZIP              %DestEXe\ *.*
  DEL %DestExe\BOOKS.ZIP
  DEL %DestExe\PKUNZIP.EXE
  DEL %DestExe\SETUP.EXE
  DEL %DestExe\SETUP.DTA
 PROGRESS 80
  GOTO COPYDONE
ELSE
  COPY %Source\PKUNZIP.EXE              %DestExe\PKUNZIP.EXE
  COPY %Source\A4V6RT.NET               %DestExe\A4V6RT.NET
  COPY %Source\SETUP.EXE                %DestExe\SETUP.EXE
  COPY %Source\SETUP.DTA                %DestExe\SETUP.DTA
  COPY %Source\README.TXT               %DestExe\README.TXT
  COPY %Source\BOOKS.ZIP                %DestExe\BOOKS.ZIP
  PROGRESS 15
  COPY %Source\COL_AID.2                %DestExe\COL_AID.2
  PROGRESS 30

  DISK "Disk 2"
  COPY %Source\COL_AID.1                %DestExe\COL_AID.ZIP

  PROGRESS 50
  APPEND %DestExe\COL_AID.2             %DestExe\COL_AID.ZIP
  PROGRESS 65
  UNZIP %DestExe\COL_AID.ZIP            %DestExe\ *.*
  UNZIP %DestExe\BOOKS.ZIP              %DestEXe\ *.*
  DEL %DestExe\COL_AID.2
  DEL %DestExe\PKUNZIP.EXE
  DEL %DestExe\SETUP.EXE
  DEL %DestExe\SETUP.DTA
  DEL %DestExe\COL_AID.ZIP
  DEL %DestExe\BOOKS.ZIP
ENDIF

:COPYDONE
MAKEDFL %DESTEXE %STARTUPP %STARTUPD %SET %CURNAME %CURSYM %DATESEP %NUMFMT %DATEFMT %SHAREMODE
PROGRESS 97
BEEP

:CHECKFPU
FPUCHECK %FpuStat
IF NO %FpuStat
  IF EQUAL %RunWin "YES"
    FILESCAN %WinPath\SYSTEM.INI "WEMU387.386" %EmuStat
    IF NO %EmuStat
      MSG "WARNING!!!" "Setup has determined that this machine does not have a math coprocessor."
      MSG "The SYSTEM.INI file has been edited to load a floating point emulator to" "allow you to run College Aid Calculator from Windows." "A backup (SYSTEM.BAK) has been saved to the COL_AID directory."
      COPY %WinPath\SYSTEM.INI    %DestExe\SYSTEM.BAK
      INSERTLINE %WinPath\SYSTEM.INI "[386Enh]" "Device=%WinPath\wemu387.386"
      COPY %DestExe\WEMU387.386    %WinPath\WEMU387.386
    ENDIF
  ENDIF
ENDIF

COPY %DestExe\modenv.exe              %BOOT\modenv.exe

:MODFILES
DEL cac.set
IF EQUAL %OSMenuSel "        Windows 95        "
  SET %RunWin "YES"
  MSG "In order to run CAC 96-7 under Windows 95, the" "following lines need to be in your configuration files:" "" "AUTOEXEC.BAT  -  SHARE /F:5000 /L:300" " " "CONFIG.SYS    -  FILES=150           " "              -  BUFFERS=32          " " "
  ASK %ModFiles "Do you want Setup to modify the AUTOEXEC.BAT and CONFIG.SYS files?" " " "(Your current files will be copied to AUTOEXEC.CAC and CONFIG.CAC)"
  IF YES %ModFiles
    FILESCAN %BOOT\CONFIG.SYS "[menu]" %DosMenu
    IF NO %DosMenu
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.BAT"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.SYS"
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.CAC"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.CAC"
      APPENDLINE "%BOOT\cac.set" "%WinPath\COMMAND\SHARE.EXE /F:5000 /L:300"
      APPENDLINE "%BOOT\cac.set" "FILES=150"
      APPENDLINE "%BOOT\cac.set" "BUFFERS=32"
      COPY %BOOT\AUTOEXEC.BAT           %BOOT\AUTOEXEC.CAC
      COPY %BOOT\CONFIG.SYS           %BOOT\CONFIG.CAC
      APPENDLINE "%BOOT\_finish.bat" "@echo off"
      APPENDLINE "%BOOT\_finish.bat" "%BOOT"
      APPENDLINE "%BOOT\_finish.bat" "cd \"
      APPENDLINE "%BOOT\_finish.bat" "modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del cac.set"
    ELSE
      MSG "Setup has detected a DOS Boot Menu in your CONFIG.SYS file."You must manually change your AUTOEXEC.BAT and CONFIG.SYS" "files.  View the README file for instructions on making the change."
    ENDIF
  ENDIF
  GOTO FINISH
ENDIF

IF EQUAL %OSMenuSel "Windows 3.1"
  SET %RunWin "YES"
  MSG "In order to run CAC 96-7 under Windows 3.1, the" "following lines need to be in your configuration files:" "" "AUTOEXEC.BAT  -  SHARE /F:4000 /L:200" " " "CONFIG.SYS    -  FILES=50            " "              -  BUFFERS=32          " " "
  ASK %ModFiles "Do you want Setup to modify the AUTOEXEC.BAT and CONFIG.SYS files?" " " "(Your current files will be copied to AUTOEXEC.CAC and CONFIG.CAC)"
  IF YES %ModFiles
    FILESCAN %BOOT\CONFIG.SYS "[menu]" %DosMenu
    IF NO %DosMenu
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.BAT"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.SYS"
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.CAC"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.CAC"
      APPENDLINE "%BOOT\cac.set" "%BOOT\DOS\SHARE.EXE /F:4000 /L:200"
      APPENDLINE "%BOOT\cac.set" "FILES=50"
      APPENDLINE "%BOOT\cac.set" "BUFFERS=32"
      COPY %BOOT\AUTOEXEC.BAT           %BOOT\AUTOEXEC.CAC
      COPY %BOOT\CONFIG.SYS           %BOOT\CONFIG.CAC
      APPENDLINE "%BOOT\_finish.bat" "@echo off"
      APPENDLINE "%BOOT\_finish.bat" "%BOOT"
      APPENDLINE "%BOOT\_finish.bat" "cd \"
      APPENDLINE "%BOOT\_finish.bat" "modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del cac.set"
    ELSE
      MSG "Setup has detected a DOS Boot Menu in your CONFIG.SYS file."You must manually change your AUTOEXEC.BAT and CONFIG.SYS" "files.  View the README file for instructions on making the change."
    ENDIF
  ENDIF
  GOTO FINISH
ENDIF

IF EQUAL %OSMenuSel "DOS"
  SET %RunWin "NO"
  MSG "In order to run CAC 96-7 under DOS, the" "following lines need to be in your configuration files:" "" "AUTOEXEC.BAT  -  SHARE /F:4000 /L:200" " " "CONFIG.SYS    -  FILES=50            " "              -  BUFFERS=32          " " "
  ASK %ModFiles "Do you want Setup to modify the AUTOEXEC.BAT and CONFIG.SYS files?" " " "(Your current files will be copied to AUTOEXEC.CAC and CONFIG.CAC)"
  IF YES %ModFiles
    FILESCAN %BOOT\CONFIG.SYS "[menu]" %DosMenu
    IF NO %DosMenu
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.BAT"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.SYS"
      APPENDLINE "%BOOT\cac.set" "%BOOT\AUTOEXEC.CAC"
      APPENDLINE "%BOOT\cac.set" "%BOOT\CONFIG.CAC"
      APPENDLINE "%BOOT\cac.set" "%BOOT\DOS\SHARE.EXE /F:4000 /L:200"
      APPENDLINE "%BOOT\cac.set" "FILES=50"
      APPENDLINE "%BOOT\cac.set" "BUFFERS=32"
      COPY %BOOT\AUTOEXEC.BAT           %BOOT\AUTOEXEC.CAC
      COPY %BOOT\CONFIG.SYS           %BOOT\CONFIG.CAC
      APPENDLINE "%BOOT\_finish.bat" "@echo off"
      APPENDLINE "%BOOT\_finish.bat" "%Boot"
      APPENDLINE "%BOOT\_finish.bat" "cd \"
      APPENDLINE "%BOOT\_finish.bat" "modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del modenv.exe"
      APPENDLINE "%BOOT\_finish.bat" "del cac.set"
    ELSE
      MSG "Setup has detected a DOS Boot Menu in your CONFIG.SYS file."You must manually change your AUTOEXEC.BAT and CONFIG.SYS" "files.  View the README file for instructions on making the change."
    ENDIF
  ENDIF
  GOTO FINISH
ENDIF

:FINISH
CLS
BEEP

APPENDLINE "%BOOT\_finish.bat" "@echo off"
APPENDLINE "%BOOT\_finish.bat" "del %Source\fini.bat"
APPENDLINE "%BOOT\_finish.bat" "%DestExe\readme.bat"
APPENDLINE "%DestExe\readme.bat" "del %BOOT\_finish.bat"
APPENDLINE "%DestExe\readme.bat" "edit %DestExe\readme.txt"
APPENDLINE "%DestExe\readme.bat" "del %DestExe\readme.bat"
APPENDLINE "%Source\fini.bat" "@echo off"
APPENDLINE "%Source\fini.bat" "%BOOT\_finish.bat"

RUN fini.bat
END