home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / misc / stepup.zip / STEPUP.EXE / SETUP.BAT < prev   
DOS Batch File  |  1993-09-30  |  5KB  |  199 lines

  1. @echo off
  2. if %1'==RESTART' goto restart
  3. if not exist 1MSDOS62.EXE goto missing
  4.  
  5. REM ----- Do expansion of a split archive -----
  6. :multi
  7. md C:\stepup
  8. if not exist c:\stepup\nul goto dir_err
  9.  
  10. REM Copy this batch file to the hard disk and transfer control to
  11. REM it so user can change floppies.
  12.  
  13. echo Preparing MS-DOS 6.2 Setup...
  14.  
  15. REM Retrieve this batch file's name from the command line
  16. REM
  17. if exist %0 goto as_is
  18.  
  19. copy %0.bat c:\stepup\msstepup.bat
  20. c:\stepup\msstepup.bat RESTART
  21.  
  22. :as_is
  23. copy %0 c:\stepup\msstepup.bat
  24. c:\stepup\msstepup.bat RESTART
  25.  
  26. :restart
  27. echo Unpacking MS-DOS 6.2 Step-Up files...
  28. 1msdos62.exe -n -o c:\stepup
  29. if errorlevel 1 goto exp_err
  30.  
  31. :check2
  32. if exist 2MSDOS62.EXE goto onward2
  33. echo.
  34. echo Insert Disk 2 and then press ENTER.
  35. echo.
  36. pause>nul
  37. goto check2
  38.  
  39. :onward2
  40. echo Continuing... unpacking MS-DOS 6.2 Step-Up files...
  41. 2msdos62.exe -n -o c:\stepup
  42. if errorlevel 1 goto exp_err
  43.  
  44. REM ------ Once the archives are unpacked, run the commands ------
  45.  
  46. :unpacked
  47. c:
  48. cd \stepup
  49.  
  50. REM ----- Begin Special Handling ------
  51. REM Check for one of 2 versions of MSDOS.SYS...
  52.  
  53. if not exist msdos2.sy# goto domksys
  54.  
  55. REM                  ITN       DUT
  56. csum C:\MSDOS.SYS 62c7 46e7 e4b3 b27f /H
  57. REM               814  935  894  938
  58.  
  59. REM Unable to check? Try MAKESYS anyway.
  60. if errorlevel 255 goto domksys
  61.  
  62. REM The common file is ready to go (itn.814 & dut.935)
  63. if errorlevel 1 if not errorlevel 2 goto domksys
  64. if errorlevel 3 if not errorlevel 4 goto domksys
  65.  
  66. REM This one needs a alternate patch file (itn.935 & dut.938)
  67. if errorlevel 2 if not errorlevel 3 goto chg_ptch
  68. if errorlevel 4 if not errorlevel 5 goto chg_ptch
  69.  
  70. REM Cannot recognize this file, so try MAKESYS anyway.
  71. goto domksys
  72.  
  73. :chg_ptch
  74. REM Was there a failure on a previous run? y: ren alternate to final
  75. if not exist msdos.sy# goto ren2
  76.  
  77. REM Has this been done before?
  78. if exist MSDOS.XX# goto domksys
  79.  
  80. ren MSDOS.SY# MSDOS.XX#
  81. :ren2
  82. ren MSDOS2.SY# MSDOS.SY#
  83.  
  84. REM ------ End Special Handling -------
  85.  
  86. :domksys
  87. echo.
  88. echo.
  89. echo Starting the MAKESYS utility...
  90. makesys
  91. if errorlevel 1 goto mksys_err
  92. echo.
  93. echo.
  94. echo Starting MS-DOS 6.2 Setup...
  95. REM LOCALIZE HERE - MS-DOS Setup Program Filename
  96. setup.exe
  97. REM Setup will reboot, so batch processing at this point indicates a
  98. REM setup failure.
  99. goto setup_err
  100.  
  101.  
  102. REM ----- Error messages ------
  103.  
  104. :missing
  105. echo.
  106. echo Cannot find the first MS-DOS 6.2 Step-Up archive file.
  107. echo.
  108. echo The archive file is named 1MSDOS62.EXE.
  109. echo
  110. echo To work properly, the SETUP.BAT file and the archive files  
  111. echo must be located in the same directory. (Do not place these
  112. echo files in the directory that contains your MS-DOS 6 files.)
  113. echo.
  114. goto exit
  115.  
  116. :dir_err
  117. echo.
  118. echo Cannot create the temporary MS-DOS 6.2 Step-Up directory (C:\STEPUP).
  119. echo.
  120. echo Make sure that drive C does not already contain a file or directory 
  121. echo named C:\STEPUP. Also, make sure that the root directory of drive C
  122. echo contains fewer than 512 files and that drive C is not write-protected.
  123. echo.
  124. goto exit
  125.  
  126. REM ---- Extraction errors ----
  127.  
  128. :exp_err
  129. echo.
  130. echo Could not extract the MS-DOS 6.2 Step-Up files.
  131. echo.
  132. if errorlevel 50 if not errorlevel 51 goto exp_spc
  133. if errorlevel 13 if not errorlevel 14 goto exp_bad
  134. if errorlevel 4 if not errorlevel 9 goto exp_mem
  135.  
  136. REM other error...
  137. echo Unable to continue.
  138. echo.
  139. goto exit
  140.  
  141. :exp_spc
  142. echo There is not enough free space on drive C.
  143. echo.
  144. echo To install MS-DOS 6.2, drive C must contain at least 6.5 MB 
  145. echo of free space.
  146. echo.
  147. goto exit
  148.  
  149. :exp_bad
  150. echo The archive file (1MSDOS62.EXE or 2MSDOS62.EXE) might be corrupted.
  151. echo.
  152. echo To continue, obtain a new copy of the MS-DOS 6.2 archive files.
  153. echo.
  154. goto exit
  155.  
  156. :exp_mem
  157. echo There is not enough free conventional memory to extract the 
  158. echo MS-DOS 6.2 Step-Up files. 
  159. echo.
  160. echo To continue, edit your CONFIG.SYS or AUTOEXEC.BAT files and use
  161. echo the REM command to temporarily disable any unnecessary device 
  162. echo drivers or memory-resident programs. Then, restart your computer 
  163. echo and run SETUP.BAT again.
  164. echo.
  165. goto exit
  166.  
  167. REM ---- MAKESYS errors ----
  168.  
  169. :mksys_err
  170. echo.
  171. echo.
  172. echo The MAKESYS utility could not complete. For more information, 
  173. echo see the MAKESYS section of the README.NOW file.
  174. echo.
  175. echo When you have read the README.NOW file and are ready to try again,
  176. echo change to the C:\STEPUP directory and type MAKESYS. If MAKESYS 
  177. echo completes successfully, then type SETUP at the command prompt.
  178. echo You do not need to run this batch file (SETUP.BAT) again.
  179. echo.
  180. goto exit
  181.  
  182. REM ---- MS-DOS Setup error ----
  183.  
  184. :setup_err
  185. echo.
  186. echo MS-DOS 6.2 Setup could not complete. 
  187. echo.
  188. echo Follow the instructions in Setup's error message (if any).
  189. echo When you are ready to try running Setup again, change to the 
  190. echo C:\STEPUP directory and type SETUP at the command prompt. 
  191. echo You do not need to run this batch file (SETUP.BAT) again.
  192. echo.
  193. echo If you quit Setup by pressing F3, you can restart it
  194. echo by changing to the C:\STEPUP directory and typing SETUP.
  195. echo.
  196. goto exit
  197.  
  198. :exit
  199.