home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
MFBGEN.ZIP
/
MFPDGEN.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-05-02
|
12KB
|
281 lines
echo off
if .%2==.nh mfpdgen %1 NH
if .%2==.Nh mfpdgen %1 NH
if .%2==.nH mfpdgen %1 NH
if .%2==.db mfpdgen %1 DB
if .%2==.Db mfpdgen %1 DB
if .%2==.dB mfpdgen %1 DB
if .%1==.5.25 mfpdgen MF %2
if .%1==.3.5 mfpdgen PS %2
cls
if .%1==.MF goto ok1
if .%1==.PS goto ok1
if .%1==.? goto qmark
echo First parameter ('%1') is not valid. The parameter should be '5.25' if you
echo have a PC/XT/AT/Jr system and a 5.25 inch A: drive, or '3.5' if you have a
echo PS/2 system and a 3.5 inch A: drive. If your system does not fit either of
echo these descriptions, you should not use this batch procedure, and you will
echo probably need to to read the MFBOOT documentation in detail and proceed on
echo your own.
echo
echo Do MFPDGEN ? for invocation parameter information.
goto done
:qmark
echo
echo Usage: MFPDGEN disksize [option]
echo
echo where 'disksize' is your A: drive diskette size ('5.25' or '3.5'),
echo or '?' to simply display this invocation information,
echo and 'option' is 'NH' if your system has no hard disk,
echo or '2' if you are interested in being able to boot from
echo drives at addresses 0 or 2 at the INT 13h level,
echo or 'DB' if you are doing a DOS-OS/2 dual boot
echo installation,
echo or leave the 'option' parameter blank to get the normal
echo version (which can boot from drives at addresses 0 and 1
echo at the INT 13h level).
echo
echo Generates an MFBOOT personalization diskette. Before running, this batch
echo file and all other files packaged in the MFBGEN.RAM LOADRAM file should be
echo placed in a temporary directory, and that directory should be the active
echo DOS directory.
goto done
:ok1
if .%2==.NH goto ok2
if .%2==.2 goto ok2
if .%2==.DB goto ok2
if .%2==. goto ok2
echo Second parameter ('%2') is not valid. It should be 'NH', if you have no
echo hard disk on your system, '2' if you wish to have a version of MFBOOT which
echo can swap drives 0 and 2 (as addressed at the INT 13h level... the default
echo is a version which can swap drives 0 and 1), 'DB' if you are setting up a
echo DOS-OS/2 dual-boot capability, or the second parameter should be omitted.
echo
echo Do MFPDGEN ? for invocation parameter information.
goto done
:ok2
if exist mfpdgen.bat goto dirok
echo Before this patch procedure can be executed, you must change the current
echo drive/directory to a directory containing files generated by running
echo LOADRAM against the MFBGEN.RAM distribution file.
goto done
:dirok
if exist %1BOOT%2.BIN goto fileok
echo Please re-read installation instructions. A required file (%1BOOT%2.BIN)
echo does not appear to be present in current directory.
goto done
:fileok
cls
echo To utilized this procedure, the DOS FORMAT and DOS DEBUG commands must be
echo installed and accessable on your system.
echo
if .%1==.PS goto s720
echo Please place a low density (360KB) blank diskette in drive A:.
goto said
:s720
echo Please place a low density (720KB) blank diskette in drive A:.
:said
echo This diskette will be formatted with the DOS FORMAT command, and any
echo data on the diskette will be lost.
echo
echo Press Ctrl-Break or Ctrl-C if you wish to terminate this procedure.
echo
pause
cls
echo If this batch procedure should terminate unexpectedly at the end of this
echo FORMAT step, it is probably because you have a FORMAT.BAT batch file
echo somewhere in your system. Check the user guide for appropriate instructions
echo in this case.
echo
echo Also, it is possible that you will get an error message from FORMAT at this
echo point, indicating invalid or unsupported parameters. This procedure is
echo aware of that possibility, and will retry FORMAT with a different set of
echo parameters in that case. You need not be concerned, as long as the diskette
echo does ultimately get formatted.
echo
if .%1==.PS goto psfmt
echo format a: /8 /1
format a: /8 /1
if errorlevel 4 format a: /4 /8 /1
goto fmtok
:psfmt
echo format a: /n:9 /t:80
format a: /n:9 /t:80
if errorlevel 4 format a:
:fmtok
echo
echo Please verify that the formatted diskette has no defects (i.e., that no
echo bytes are listed as 'unavailable' in the format report). If defects are
echo indicated, you should abort this installation procedure and start again
echo with another diskette.
if .%1==.MF goto sizeok
echo
echo Also, please verify that the indicated diskette capacity ('total disk
echo space') is 730112 bytes. If some other diskette capacity is indicated, you
echo have a version of FORMAT which formats in a non-standard way, this
echo installation procedure will not work, and it should be aborted.
:sizeok
echo
echo To abort the installation procedure, press Ctrl-Break or Ctrl-C.
echo
pause
cls
if .%2==.DB goto crbt
echo We will now use DOS DEBUG to create a 'FILL' file.
echo
if .%1==.PS goto psfill
echo debug a:fill (using s200.scr for STDIN)
debug a:fill <s200.scr
goto filled
:psfill
echo debug a:fill (using s800.scr for STDIN)
debug a:fill <s800.scr
goto filled
:crbt
echo We will now use DOS DEBUG to create some files.
echo
echo debug a:bootrec (using s200.scr for STDIN)
debug a:bootrec <s200.scr
if .%1==.MF goto filled
echo debug a:fill (using s400.scr for STDIN)
debug a:fill <s400.scr
:filled
echo
if exist a:bootrec goto fillok
if exist a:fill goto fillok
echo Something has gone wrong. DEBUG could not create a file on the A: disk.
echo Check that DEBUG is available on your system, then try this procedure
echo again.
goto done
:fillok
echo We will now copy %1BOOT%2.COM to the personalization diskette, and we will
echo personalize the boot record on the diskette with DEBUG
echo
echo copy %1BOOT%2.BIN a:%1BOOT%2.COM
copy %1BOOT%2.BIN a:%1BOOT%2.COM
echo debug a:%1BOOT%2.COM (using wboot.scr for STDIN)
debug a:%1BOOT%2.COM <wboot.scr
echo
pause
cls
if not .%2==.DB goto notdb1
echo copy saveboot.brf a:saveboot.bat
copy saveboot.brf a:saveboot.bat
if .%1==.MF echo copy saveboot.sc1 a:saveboot.scr
if .%1==.MF copy saveboot.sc1 a:saveboot.scr
if .%1==.PS echo copy saveboot.sc2 a:saveboot.scr
if .%1==.PS copy saveboot.sc2 a:saveboot.scr
echo copy restboot.brf a:restboot.bat
copy restboot.brf a:restboot.bat
echo copy restboot.scr a:restboot.scr
copy restboot.scr a:restboot.scr
echo copy makechk.brf a:makechk.bat
copy makechk.brf a:makechk.bat
echo copy syschk.bin a:syschk.bin
copy syschk.bin a:syschk.bin
echo
pause
cls
:notdb1
echo Construction of the personalization diskette is complete.
echo
echo Personalization procedure:
echo
echo To personalize the %1BOOT%2 program for your machine, boot your system
echo (Ctrl-Alt-Del) with the personalization diskette in drive A:. This will
echo result in the program file (%1BOOT%2.COM) on the personalization diskette
echo being 'personalized' to match the configuration of your system.
echo
echo Booting the personalization diskette should result in a message indicating
echo that the .COM file on the diskette has been personalized. After you see
echo that message, you should remove the personalization diskette from drive A:,
if .%2==.DB echo and reboot DOS using Ctrl-Alt-Del.
if .%2==.DB goto db1
echo reboot DOS using Ctrl-Alt-Del, and then again place the personalization
echo diskette in drive A:. Then, you should copy the %1BOOT%2.COM file from
echo the A: drive to your fixed disk or some other place where it will be more
echo conveniently available for invocation (preferably to a directory which is
echo specified in your normal DOS PATH setting). Then, you should label your
echo personalization diskette as such, and retain it for re-personalization in
echo the future, in the event that your system configuration changes. To re-
echo personalize, you should repeat the instructions given in this message,
echo starting at 'Personalization procedure.'
echo
pause
cls
echo After making %1BOOT%2 available via your normal DOS PATH:
echo
echo To review command options, type %1BOOT%2 ?
echo To reboot your system from fixed disk, type %1BOOT%2
echo To reboot your system from drive A:, type %1BOOT%2 A
if .%2==.2 goto drv2
echo To reboot your system from drive B:, type %1BOOT%2 A D
goto drvx
:drv2
echo To reboot your system from the drive
echo which is known as drive 2 at the
echo BIOS (INT 13h) level, type %1BOOT%2 A D
:drvx
echo
echo When you reboot your system by invoking the %1BOOT%2 command, you
echo should NOT press Ctrl-Alt-Del. Ctrl-Alt-Del will cause a reboot under
echo control of the ROM BIOS, and will render the %1BOOT%2 invocation as
echo ineffective and irrelevant.
goto done
:db1
echo
echo You should make a DISKCOPY of the personalization diskette. You should then
echo label one copy of the diskette as %1BOOT - DOS, and the other as %1BOOT -
echo OS/2. On the DOS version, rename the %1BOOT%2.COM file to DOS.COM, and on
echo the OS2 version, rename the %1BOOT%2.COM file to OS2.COM. Both diskettes
echo must be personalized as indicated above, unless you do the personalization
echo of the first diskette before doing the DISKCOPY.
echo
pause
cls
echo At some time when DOS on the fixed disk is bootable via Ctrl-Alt-Del, you
echo should place the '%1BOOT - DOS' diskette in drive A: and execute the
echo command 'A:SAVEBOOT', in order to capture the DOS boot record in the
echo DOS.COM and BOOTREC files on the %1BOOT - DOS diskette. DOS DEBUG must be
echo accessable via the DOS path when this step is done.
echo
echo At some time when OS/2 on fixed disk is bootable via Ctrl-Alt-Del, you
echo should boot DOS from diskette (since DEBUG isn't available under OS/2),
echo place the '%1BOOT - OS/2' diskette in drive A: and execute the command
echo 'A:SAVEBOOT', in order to capture the OS/2 boot record in the OS2.COM and
echo BOOTREC files on the %1BOOT - OS/2 diskette. DOS DEBUG must be accessable
echo via the DOS path or on the A: drive when this step is done - if you can't
echo make it accessable via the DOS path, then copy the DOS DEBUG module to the
echo %1BOOT - OS/2 diskette before running SAVEBOOT.
echo
echo Note that execution of the SAVEBOOT step on the personalization diskettes
echo is independent of the Ctrl-Alt-Del personalization step. SAVEBOOT may be
echo done either before or after personalization. The SAVEBOOT step should be
echo repeated if you install a new version of DOS or OS/2, but need not be
echo repeated if you change your hardware configuration. Personalization should
echo be repeated if you change your configuration, but need not be repeated as a
echo result of changing your DOS or OS/2 version.
echo
pause
cls
echo Each time that either DOS.COM or OS2.COM on the personalization diskettes
echo are updated due either to personalization or execution of SAVEBOOT, the
echo files should be (re)copied to a suitable directory on your fixed disk for
echo more convenient execution.
echo
echo When you issue the 'DOS' command (invoke DOS.COM) from DOS or from OS/2 DOS
echo emulation mode, the machine is rebooted, but DOS.COM's imbedded copy of the
echo DOS boot record is substituted for the boot record which would normally be
echo loaded from disk, thus causing DOS to boot. Similarly, the OS2 command will
echo start OS/2 from either DOS or OS/2 DOS emulation mode, by substituting it's
echo imbedded OS/2 boot record for boot record from disk. Depending on which
echo boot record (DOS or OS/2) is left in the boot record slot on the fixed
echo disk, you can make either system boot by default via Ctrl-Alt-Del. You can
echo restore either the DOS or the OS/2 boot record to the boot record slot on
echo the fixed disk by executing the A:RESTBOOT procedure on the DOS or OS/2
echo personalization diskettes, respectively. Note that A:RESTBOOT must be
echo executed under DOS, since OS/2 has no DEBUG command.
:done
echo
rem