home *** CD-ROM | disk | FTP | other *** search
/ Unprotect 6 / Unprotect-6.0.iso / update / fb96_101 / update.bat < prev   
Encoding:
DOS Batch File  |  1995-12-20  |  4.8 KB  |  159 lines

  1. @echo off
  2. rem **** This UPDATE.BAT file will copy and install the Football Pro '96
  3. rem **** version 1.01 patch disk to the specified hard drive and game
  4. rem **** directory.  If no parameters are specified, it will first
  5. rem **** check for the patch files already in the current directory.
  6. rem **** If they are not there, it will attempt to install using the
  7. rem **** default drives and directory, i.e., installing from A: to
  8. rem **** C:\SIERRA\FBPRO96.
  9.  
  10. echo This batch file will update FPS: Football Pro '96 version 1.00 to
  11. echo version 1.01.  The proper syntax for using this installation
  12. echo precedure is:
  13. echo.
  14. echo   UPDATE [source drive] [destination drive] [destination directory]
  15. echo.
  16. echo   Example:  UPDATE A: C: \SIERRA\FBPRO96
  17. echo.
  18. echo Note:  You must specify the drives and directories as 3 seperate
  19. echo parameters with a space between each one
  20. echo.
  21. pause
  22.  
  23. rem **** check to see if there are no parameters specified
  24. if "%1"=="" goto noparms1
  25. if "%2"=="" goto noparms1
  26. if "%3"=="" goto noparms1
  27.  
  28. rem **** check the status of the 1st parameter and set F variable
  29. :chkfd
  30. if exist %1\patch.rtp SET F=%1
  31. if exist %1:\patch.rtp SET F=%1:
  32. if exist %F%\patch.rtp goto chkhd
  33. goto needparm
  34.  
  35. rem **** check the status of the 2nd parameter and set H variable
  36. :chkhd
  37. if exist %2\.. goto needparm
  38. if exist %2\nul SET H=%2
  39. if exist %2:\nul SET H=%2:
  40. if exist %H%nul goto chkdr
  41. goto needparm
  42.  
  43. rem **** check the status of the 3rd parameter and set D variable
  44. :chkdr
  45. if exist %H%%3shell.exe goto notrail
  46. if exist %H%\%3\shell.exe SET D=\%3
  47. if exist %H%%3\shell.exe SET D=%3
  48. if not exist %H%%D%\shell.exe goto needparm
  49.  
  50. rem **** copy all files from disk 1 to game directory
  51. %H%
  52. cd %D%
  53. cls
  54. echo Copying patch files . . .
  55. copy %F%\*.*
  56.  
  57. echo.
  58. echo Applying the patch files
  59. echo. 
  60.  
  61. rem **** patch version 1.00 to 1.01
  62. :patchit
  63. patch patch.rtp
  64.  
  65. rem **** Update fbcheck.dat
  66. cls
  67. echo Updating FBCHECK.DAT...
  68. fbcheck -69
  69. del fbcheck.lst
  70. echo.
  71. echo  Finished applying Football Pro '96 version 1.01 patch files.
  72. echo.
  73. echo  Read the readme.101 file for additional information about what
  74. echo  this patch fixes.
  75. echo.
  76. goto end
  77.  
  78.  
  79. rem **** If no parameters are specified, first check to see if the
  80. rem **** files are in the game directory.  If they are, go directly to
  81. rem **** patchit section, if not check the default drives and directory
  82. rem **** of A: C: \SIERRA\FBPRO96.  If they aren't there, goto needparm.
  83. :noparms1
  84. if not exist .\patch.exe goto nope
  85. if not exist .\patch.rtp goto nope
  86. if not exist .\shell.exe goto nope
  87. goto patchit
  88.  
  89. :nope
  90. cls
  91. echo Now checking for existence of patch disk in drive A: and game in
  92. echo C:\SIERRA\FBPRO96.  If there is no disk in drive A:, you will
  93. echo receive an "Abort, Retry, Fail" message on this step.  To clear
  94. echo the message if it appears, either insert a formatted floppy disk
  95. echo in drive A: and press "R" to "Retry" or press "F" to "Fail" the
  96. echo check.
  97. echo.
  98. if not exist a:nul goto needparm
  99. if not exist a:\patch.rtp goto needparm
  100. if not exist c:\sierra\fbpro96\shell.exe goto needparm
  101.  
  102.  
  103. echo.
  104. echo Prepared to install the Football Pro '96 version 1.01 patch
  105. echo from floppy disk in drive A: to C:\SIERRA\FBPRO96.
  106. echo.
  107. echo If this is NOT correct, press CTRL+C now to terminate
  108. echo execution of the install batch file, otherwise,
  109. echo.
  110. pause
  111.  
  112. echo.
  113. echo Now copying patch files to C:\SIERRA\FBPRO96...
  114.  
  115. rem **** Actual execution of the default copy process
  116. c:
  117. cd \sierra\fbpro96
  118. copy a:\*.*
  119. goto patchit
  120.  
  121.  
  122. rem **** Extra prompt for telling user not to put a trailing backslash on dir
  123. :notrail
  124. echo Do not use a trailing backslash on the directory name.
  125. echo.
  126.  
  127. rem **** Bad or missing parameters procedure
  128. :needparm
  129. cls
  130. echo You did not specify the proper source and destination paths and/or
  131. echo drives.  The proper syntax for the installation is:
  132. echo.
  133. echo        UPDATE A: C: \SIERRA\FBPRO96
  134. echo.
  135. echo Replace the "A:" with the letter of the floppy drive with the patch
  136. echo disk.  Replace the "C:" with the letter of the hard drive where
  137. echo Football is installed.  Replace "\SIERRA\FBPRO96" with the directory
  138. echo where Football Pro '96 is installed.
  139. echo.
  140. echo Note that you may specify the drives with or without the colon (both
  141. echo A and A: are acceptable) and the directory with or without the
  142. echo leading backslash (both \SIERRA\FBPRO96 and SIERRA\FBPRO96 are
  143. echo acceptable).  The directory name cannot have a trailing backslash.
  144. echo.
  145. echo If no parameters are specified, the default drives and directory (as
  146. echo shown in the above example) will be tried before providing this
  147. echo prompt screen.
  148. echo.
  149. echo Please try again.
  150. pause
  151.  
  152. rem **** Clean everything up by deleting the patch files and
  153. rem **** clearing the variables.
  154. :end
  155. if exist %H%%D%\shell.exe del %H%%D%\patch*.*
  156. SET F=
  157. SET H=
  158. SET D=
  159.