home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / MFBGEN.ZIP / MFPDGEN.BAT < prev    next >
DOS Batch File  |  1989-05-02  |  12KB  |  281 lines

  1. echo off
  2. if .%2==.nh mfpdgen %1 NH
  3. if .%2==.Nh mfpdgen %1 NH
  4. if .%2==.nH mfpdgen %1 NH
  5. if .%2==.db mfpdgen %1 DB
  6. if .%2==.Db mfpdgen %1 DB
  7. if .%2==.dB mfpdgen %1 DB
  8. if .%1==.5.25 mfpdgen MF %2
  9. if .%1==.3.5 mfpdgen PS %2
  10. cls
  11. if .%1==.MF goto ok1
  12. if .%1==.PS goto ok1
  13. if .%1==.? goto qmark
  14. echo First parameter ('%1') is not valid. The parameter should be '5.25' if you
  15. echo have a PC/XT/AT/Jr system and a 5.25 inch A: drive, or '3.5' if you have a
  16. echo PS/2 system and a 3.5 inch A: drive. If your system does not fit either of
  17. echo these descriptions, you should not use this batch procedure, and you will
  18. echo probably need to to read the MFBOOT documentation in detail and proceed on
  19. echo your own.
  20. echo 
  21. echo Do MFPDGEN ? for invocation parameter information.
  22. goto done
  23. :qmark
  24. echo 
  25. echo Usage: MFPDGEN disksize [option]
  26. echo 
  27. echo where 'disksize'  is your A: drive diskette size ('5.25' or '3.5'),
  28. echo                   or '?'  to simply display this invocation information,
  29. echo   and 'option'    is 'NH' if your system has no hard disk,
  30. echo                   or '2'  if you are interested in being able to boot from
  31. echo                           drives at addresses 0 or 2 at the INT 13h level,
  32. echo                   or 'DB' if you are doing a DOS-OS/2 dual boot
  33. echo                           installation,
  34. echo                   or leave the 'option' parameter blank to get the normal
  35. echo                   version (which can boot from drives at addresses 0 and 1
  36. echo                   at the INT 13h level).
  37. echo 
  38. echo Generates an MFBOOT personalization diskette. Before running, this batch
  39. echo file and all other files packaged in the MFBGEN.RAM LOADRAM file should be
  40. echo placed in a temporary directory, and that directory should be the active
  41. echo DOS directory.
  42. goto done
  43. :ok1
  44. if .%2==.NH goto ok2
  45. if .%2==.2 goto ok2
  46. if .%2==.DB goto ok2
  47. if .%2==. goto ok2
  48. echo Second parameter ('%2') is not valid. It should be 'NH', if you have no
  49. echo hard disk on your system, '2' if you wish to have a version of MFBOOT which
  50. echo can swap drives 0 and 2 (as addressed at the INT 13h level... the default
  51. echo is a version which can swap drives 0 and 1), 'DB' if you are setting up a
  52. echo DOS-OS/2 dual-boot capability, or the second parameter should be omitted.
  53. echo 
  54. echo Do MFPDGEN ? for invocation parameter information.
  55. goto done
  56. :ok2
  57. if exist mfpdgen.bat goto dirok
  58. echo Before this patch procedure can be executed, you must change the current
  59. echo drive/directory to a directory containing files generated by running
  60. echo LOADRAM against the MFBGEN.RAM distribution file.
  61. goto done
  62. :dirok
  63. if exist %1BOOT%2.BIN goto fileok
  64. echo Please re-read installation instructions. A required file (%1BOOT%2.BIN)
  65. echo does not appear to be present in current directory.
  66. goto done
  67. :fileok
  68. cls
  69. echo To utilized this procedure, the DOS FORMAT and DOS DEBUG commands must be
  70. echo installed and accessable on your system.
  71. echo 
  72. if .%1==.PS goto s720
  73. echo Please place a low density (360KB) blank diskette in drive A:.
  74. goto said
  75. :s720
  76. echo Please place a low density (720KB) blank diskette in drive A:.
  77. :said
  78. echo This diskette will be formatted with the DOS FORMAT command, and any
  79. echo data on the diskette will be lost.
  80. echo 
  81. echo Press Ctrl-Break or Ctrl-C if you wish to terminate this procedure.
  82. echo 
  83. pause
  84. cls
  85. echo If this batch procedure should terminate unexpectedly at the end of this
  86. echo FORMAT step, it is probably because you have a FORMAT.BAT batch file
  87. echo somewhere in your system. Check the user guide for appropriate instructions
  88. echo in this case.
  89. echo 
  90. echo Also, it is possible that you will get an error message from FORMAT at this
  91. echo point, indicating invalid or unsupported parameters. This procedure is
  92. echo aware of that possibility, and will retry FORMAT with a different set of
  93. echo parameters in that case. You need not be concerned, as long as the diskette
  94. echo does ultimately get formatted.
  95. echo 
  96. if .%1==.PS goto psfmt
  97. echo format a: /8 /1
  98. format a: /8 /1
  99. if errorlevel 4 format a: /4 /8 /1
  100. goto fmtok
  101. :psfmt
  102. echo format a: /n:9 /t:80
  103. format a: /n:9 /t:80
  104. if errorlevel 4 format a:
  105. :fmtok
  106. echo 
  107. echo Please verify that the formatted diskette has no defects (i.e., that no
  108. echo bytes are listed as 'unavailable' in the format report). If defects are
  109. echo indicated, you should abort this installation procedure and start again
  110. echo with another diskette.
  111. if .%1==.MF goto sizeok
  112. echo 
  113. echo Also, please verify that the indicated diskette capacity ('total disk
  114. echo space') is 730112 bytes. If some other diskette capacity is indicated, you
  115. echo have a version of FORMAT which formats in a non-standard way, this
  116. echo installation procedure will not work, and it should be aborted.
  117. :sizeok
  118. echo 
  119. echo To abort the installation procedure, press Ctrl-Break or Ctrl-C.
  120. echo 
  121. pause
  122. cls
  123. if .%2==.DB goto crbt
  124. echo We will now use DOS DEBUG to create a 'FILL' file.
  125. echo 
  126. if .%1==.PS goto psfill
  127. echo debug a:fill (using s200.scr for STDIN)
  128. debug a:fill <s200.scr
  129. goto filled
  130. :psfill
  131. echo debug a:fill (using s800.scr for STDIN)
  132. debug a:fill <s800.scr
  133. goto filled
  134. :crbt
  135. echo We will now use DOS DEBUG to create some files.
  136. echo 
  137. echo debug a:bootrec (using s200.scr for STDIN)
  138. debug a:bootrec <s200.scr
  139. if .%1==.MF goto filled
  140. echo debug a:fill (using s400.scr for STDIN)
  141. debug a:fill <s400.scr
  142. :filled
  143. echo 
  144. if exist a:bootrec goto fillok
  145. if exist a:fill goto fillok
  146. echo Something has gone wrong. DEBUG could not create a file on the A: disk.
  147. echo Check that DEBUG is available on your system, then try this procedure
  148. echo again.
  149. goto done
  150. :fillok
  151. echo We will now copy %1BOOT%2.COM to the personalization diskette, and we will
  152. echo personalize the boot record on the diskette with DEBUG
  153. echo 
  154. echo copy %1BOOT%2.BIN a:%1BOOT%2.COM
  155. copy %1BOOT%2.BIN a:%1BOOT%2.COM
  156. echo debug a:%1BOOT%2.COM (using wboot.scr for STDIN)
  157. debug a:%1BOOT%2.COM <wboot.scr
  158. echo 
  159. pause
  160. cls
  161. if not .%2==.DB goto notdb1
  162. echo copy saveboot.brf a:saveboot.bat
  163. copy saveboot.brf a:saveboot.bat
  164. if .%1==.MF echo copy saveboot.sc1 a:saveboot.scr
  165. if .%1==.MF copy saveboot.sc1 a:saveboot.scr
  166. if .%1==.PS echo copy saveboot.sc2 a:saveboot.scr
  167. if .%1==.PS copy saveboot.sc2 a:saveboot.scr
  168. echo copy restboot.brf a:restboot.bat
  169. copy restboot.brf a:restboot.bat
  170. echo copy restboot.scr a:restboot.scr
  171. copy restboot.scr a:restboot.scr
  172. echo copy makechk.brf a:makechk.bat
  173. copy makechk.brf a:makechk.bat
  174. echo copy syschk.bin a:syschk.bin
  175. copy syschk.bin a:syschk.bin
  176. echo 
  177. pause
  178. cls
  179. :notdb1
  180. echo Construction of the personalization diskette is complete.
  181. echo 
  182. echo Personalization procedure:
  183. echo 
  184. echo To personalize the %1BOOT%2 program for your machine, boot your system
  185. echo (Ctrl-Alt-Del) with the personalization diskette in drive A:. This will
  186. echo result in the program file (%1BOOT%2.COM) on the personalization diskette
  187. echo being 'personalized' to match the configuration of your system.
  188. echo 
  189. echo Booting the personalization diskette should result in a message indicating
  190. echo that the .COM file on the diskette has been personalized. After you see
  191. echo that message, you should remove the personalization diskette from drive A:,
  192. if .%2==.DB echo and reboot DOS using Ctrl-Alt-Del.
  193. if .%2==.DB goto db1
  194. echo reboot DOS using Ctrl-Alt-Del, and then again place the personalization
  195. echo diskette in drive A:. Then, you should copy the %1BOOT%2.COM file from
  196. echo the A: drive to your fixed disk or some other place where it will be more
  197. echo conveniently available for invocation (preferably to a directory which is
  198. echo specified in your normal DOS PATH setting). Then, you should label your
  199. echo personalization diskette as such, and retain it for re-personalization in
  200. echo the future, in the event that your system configuration changes. To re-
  201. echo personalize, you should repeat the instructions given in this message,
  202. echo starting at 'Personalization procedure.'
  203. echo 
  204. pause
  205. cls
  206. echo After making %1BOOT%2 available via your normal DOS PATH:
  207. echo 
  208. echo   To review command options,             type %1BOOT%2 ?
  209. echo   To reboot your system from fixed disk, type %1BOOT%2
  210. echo   To reboot your system from drive A:,   type %1BOOT%2 A
  211. if .%2==.2 goto drv2
  212. echo   To reboot your system from drive B:,   type %1BOOT%2 A D
  213. goto drvx
  214. :drv2
  215. echo   To reboot your system from the drive
  216. echo     which is known as drive 2 at the
  217. echo     BIOS (INT 13h) level,                type %1BOOT%2 A D
  218. :drvx
  219. echo 
  220. echo When you reboot your system by invoking the %1BOOT%2 command, you
  221. echo should NOT press Ctrl-Alt-Del. Ctrl-Alt-Del will cause a reboot under
  222. echo control of the ROM BIOS, and will render the %1BOOT%2 invocation as
  223. echo ineffective and irrelevant.
  224. goto done
  225. :db1
  226. echo 
  227. echo You should make a DISKCOPY of the personalization diskette. You should then
  228. echo label one copy of the diskette as %1BOOT - DOS, and the other as %1BOOT -
  229. echo OS/2. On the DOS version, rename the %1BOOT%2.COM file to DOS.COM, and on
  230. echo the OS2 version, rename the %1BOOT%2.COM file to OS2.COM. Both diskettes
  231. echo must be personalized as indicated above, unless you do the personalization
  232. echo of the first diskette before doing the DISKCOPY.
  233. echo 
  234. pause
  235. cls
  236. echo At some time when DOS on the fixed disk is bootable via Ctrl-Alt-Del, you
  237. echo should place the '%1BOOT - DOS' diskette in drive A: and execute the
  238. echo command 'A:SAVEBOOT', in order to capture the DOS boot record in the
  239. echo DOS.COM and BOOTREC files on the %1BOOT - DOS diskette. DOS DEBUG must be
  240. echo accessable via the DOS path when this step is done.
  241. echo 
  242. echo At some time when OS/2 on fixed disk is bootable via Ctrl-Alt-Del, you
  243. echo should boot DOS from diskette (since DEBUG isn't available under OS/2),
  244. echo place the '%1BOOT - OS/2' diskette in drive A: and execute the command
  245. echo 'A:SAVEBOOT', in order to capture the OS/2 boot record in the OS2.COM and
  246. echo BOOTREC files on the %1BOOT - OS/2 diskette. DOS DEBUG must be accessable
  247. echo via the DOS path or on the A: drive when this step is done - if you can't
  248. echo make it accessable via the DOS path, then copy the DOS DEBUG module to the
  249. echo %1BOOT - OS/2 diskette before running SAVEBOOT.
  250. echo 
  251. echo Note that execution of the SAVEBOOT step on the personalization diskettes
  252. echo is independent of the Ctrl-Alt-Del personalization step. SAVEBOOT may be
  253. echo done either before or after personalization. The SAVEBOOT step should be
  254. echo repeated if you install a new version of DOS or OS/2, but need not be
  255. echo repeated if you change your hardware configuration. Personalization should
  256. echo be repeated if you change your configuration, but need not be repeated as a
  257. echo result of changing your DOS or OS/2 version.
  258. echo 
  259. pause
  260. cls
  261. echo Each time that either DOS.COM or OS2.COM on the personalization diskettes
  262. echo are updated due either to personalization or execution of SAVEBOOT, the
  263. echo files should be (re)copied to a suitable directory on your fixed disk for
  264. echo more convenient execution.
  265. echo 
  266. echo When you issue the 'DOS' command (invoke DOS.COM) from DOS or from OS/2 DOS
  267. echo emulation mode, the machine is rebooted, but DOS.COM's imbedded copy of the
  268. echo DOS boot record is substituted for the boot record which would normally be
  269. echo loaded from disk, thus causing DOS to boot. Similarly, the OS2 command will
  270. echo start OS/2 from either DOS or OS/2 DOS emulation mode, by substituting it's
  271. echo imbedded OS/2 boot record for boot record from disk. Depending on which
  272. echo boot record (DOS or OS/2) is left in the boot record slot on the fixed
  273. echo disk, you can make either system boot by default via Ctrl-Alt-Del. You can
  274. echo restore either the DOS or the OS/2 boot record to the boot record slot on
  275. echo the fixed disk by executing the A:RESTBOOT procedure on the DOS or OS/2
  276. echo personalization diskettes, respectively. Note that A:RESTBOOT must be
  277. echo executed under DOS, since OS/2 has no DEBUG command.
  278. :done
  279. echo 
  280. rem
  281.