home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: OtherApp
/
OtherApp.zip
/
dualos2.exe
/
MAKESR.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-08-01
|
12KB
|
283 lines
@echo off
rem MAKESR.CMD version 2.04
rem This OS/2 command file creates a set of bootable floppies from a
rem working OS/2 2.xx and 3.x system. It installs drivers and utilities
rem for IBM Standalone Restore (SR) system.
REM ========================================================================
REM =================Version 2.04 Changes===================================
REM 06/04/95
REM - Changes for Warp Connect:
REM - REM'd out statement to add basedev=print01.sys to SR disk 2 config.sys as
REM Warp Connect doesn't have this driver.
REM - Added statement to erase CMDATAPI.FLT new to Warp Connect
REM - Fixed bug that erased TOSHCDS1.EXE to TOSHCDS1.FLT
REM ========================================================================
REM ========================================================================
REM =================Version 2.03 Changes===================================
REM 03/05/95
REM - Added CheckREXX routine to make sure REXX is installed as MakeSR is now a
REM REXX program beginning with version 2.03
REM - Added call to 2nd .cmd file which is a REXX file to get user's country code in
REM devinfo=kbd... statement from hard file config.sys
REM - Added check to look for testcfg.sys and dos.sys in both the \os2 directory
REM and the \os2\boot directory
REM ========================================================================
REM ========================================================================
REM =================Version 2.02 Changes===================================
REM - Added check to delete *.flt files from WARP CD-ROM SR disk #2 to make room
REM ========================================================================
REM ========================================================================
REM =================Version 2.01 Changes===================================
REM - Added Check for BASEDEV=IBMKBD.SYS for WARP
REM - Added Check for KBDCALLS.DLL to SR Disk #3
REM - Added Check for NLS.DLL to SR Disk #3
REM ========================================================================
echo MakeSR version 2.04
echo.
rem Set up some things
IF (%1) == () GOTO ParmErr
IF (%2) == () GOTO ParmErr
rem cls
:CheckSystem
rem Check for valid system drive
if exist %1\OS2\FORMAT.COM goto :CheckREXX
goto :InvalidSystem
:CheckREXX
rem Check to make sure REXX is installed
if exist %1\OS2\DLL\REXX.DLL goto :CheckTarget
goto :NoREXX
:CheckTarget
rem Check for valid floppy drive
if (%2)==(A:) goto :CheckLocal
if (%2)==(B:) goto :CheckLocal
if (%2)==(a:) goto :CheckLocal
if (%2)==(b:) goto :CheckLocal
goto :InvalidTarget
:CheckLocal
rem Make sure that current directory contains necessary files
if exist SR.EXE goto :Begin
goto :InvalidLocal
:Begin
echo ┌────────────────────────────────────────────────┐
echo │ │
echo │MakeSR version 2.04 │
echo │................... │
echo │Install system files from drive %1 │
echo │Install to Disk is %2 │
echo │ │
echo └────────────────────────────────────────────────┘
echo ┌────────────────────────────────────────────────┐
echo │Insert SR DISK #2 in drive %2 │
echo └────────────────────────────────────────────────┘
echo Press CTRL-C to QUIT
echo or
PAUSE
echo ┌────────────────────────────────────────────────┐
echo │Deleting files from SR Disk #2 │
echo └────────────────────────────────────────────────┘
attrib %2\config.sys -r
IF EXIST %2\BUNDLE del %2\BUNDLE > nul
IF EXIST %2\FIX\OS2\CSF_PROD.OS2 del %2\FIX\OS2\CSF_PROD.OS2 > nul
IF EXIST %2\FIX\OS2\FILE27.___ del %2\FIX\OS2\FILE27.___ > nul
IF EXIST %2\FIX\OS2\FILE1090.___ del %2\FIX\OS2\FILE1090.___ > nul
IF EXIST %2\FS1.EXE del %2\FS1.EXE > nul
IF EXIST %2\FService.EXE del %2\FService.EXE > nul
IF EXIST %2\FService.msg del %2\FService.msg > nul
IF EXIST %2\CONFIG.SYS del %2\CONFIG.SYS >nul
IF EXIST %2\SYSINST1.EXE del %2\SYSINST1.EXE > nul
IF EXIST %2\SYSINST2.EXE del %2\SYSINST2.EXE > nul
IF EXIST %2\MOUSE.SYS del %2\MOUSE.SYS > nul
IF EXIST %2\CHINCDS1.FLT del %2\CHINCDS1.FLT > nul
IF EXIST %2\HITCDS1.FLT del %2\HITCDS1.FLT > nul
IF EXIST %2\NECCDS1.FLT del %2\NECCDS1.FLT > nul
IF EXIST %2\SONYCDS1.FLT del %2\SONYCDS1.FLT > nul
IF EXIST %2\TOSHCDS1.FLT del %2\TOSHCDS1.FLT > nul
IF EXIST %2\IBMIDECD.FLT del %2\IBMIDECD.FLT > nul
IF EXIST %2\CMDATAPI.FLT del %2\CMDATAPI.FLT > nul
echo ┌────────────────────────────────────────────────┐
echo │Copying files to SR Disk #2 │
echo └────────────────────────────────────────────────┘
copy IP22DRV.SYS %2\ >nul
copy IP2XDMN.EXE %2\ >nul
if exist %2\dos.sys goto :DoTestCfg
if exist %1\os2\dos.sys copy %1\os2\dos.sys %2\ > nul
if exist %1\os2\boot\dos.sys copy %1\os2\boot\dos.sys %2\ > nul
:DoTestCfg
if exist %2\testcfg.sys goto :Cont
if exist %1\os2\testcfg.sys copy %1\os2\testcfg.sys %2\ > nul
if exist %1\os2\boot\testcfg.sys copy %1\os2\boot\testcfg.sys %2\ > nul
:Cont
echo ┌────────────────────────────────────────────────┐
echo │Creating CONFIG.SYS on SR Disk #2 │
echo └────────────────────────────────────────────────┘
echo buffers=32 >> %2\config.sys
echo iopl=yes >> %2\config.sys
echo memman=noswap >> %2\config.sys
echo protshell=a:\cmd.exe /k startup.cmd >> %2\config.sys
echo set os2_shell=a:\cmd.exe >> %2\config.sys
echo diskcache=64,LW >> %2\config.sys
echo protectonly=yes >> %2\config.sys
echo libpath=.;\;\os2\dll; >> %2\config.sys
echo ┌────────────────────────────────────────────────┐
echo │Checking for HPFS.IFS in %1\OS2 Directory │
echo └────────────────────────────────────────────────┘
if exist %1\os2\hpfs.ifs echo ifs=hpfs.ifs /c:64 >> %2\config.sys
echo device=ip22drv.sys >> %2\config.sys
if exist %2\dos.sys echo device=\dos.sys >> %2\config.sys
echo pauseonerror=no >> %2\config.sys
echo codepage=850 >> %2\config.sys
rem if rexx is not installed, write us keyboard.dcp code to config.sys, else call rexxkbd.cmd
if not exist %1\OS2\DLL\REXX.DLL echo devinfo=kbd,us,keyboard.dcp >> %2\config.sys
if exist %1\OS2\DLL\REXX.DLL call rexxkbd.cmd %1\config.sys %2\config.sys
echo devinfo=scr,ega,vtbl850.dcp >> %2\config.sys
echo set path=\;\os2;\os2\system;\os2\install >> %2\config.sys
echo set dpath=\;\os2;\os2\system;\os2\install >> %2\config.sys
echo set keys=on >> %2\config.sys
rem echo basedev=print01.sys >> %2\config.sys took out when Warp Connect didn't have
IF EXIST %2\ibmkbd.sys echo basedev=ibmkbd.sys >> %2\config.sys
echo basedev=ibm1flpy.add >> %2\config.sys
echo basedev=ibm1s506.add >> %2\config.sys
echo basedev=ibm2flpy.add >> %2\config.sys
echo basedev=ibm2adsk.add >> %2\config.sys
IF EXIST %2\ibm2m57.add echo basedev=ibm2m57.add >> %2\config.sys
echo basedev=ibm2scsi.add >> %2\config.sys
echo basedev=ibmint13.i13 >> %2\config.sys
echo basedev=os2dasd.dmd >> %2\config.sys
if exist %2\testcfg.sys echo device=\testcfg.sys >> %2\config.sys
echo ┌────────────────────────────────────────────────┐
echo │Creating STARTUP.CMD on SR Disk #2 │
echo └────────────────────────────────────────────────┘
echo @echo off > %2\startup.cmd
echo @cls >> %2\startup.cmd
echo type message.txt >> %2\startup.cmd
echo detach ip2xdmn.exe >nul >> %2\startup.cmd
echo ┌────────────────────────────────────────────────┐
echo │Creating MESSAGE.TXT on SR Disk #2 │
echo └────────────────────────────────────────────────┘
echo.
echo ┌────────────────────────────────────────────────┐ > %2\message.txt
echo │ │ >> %2\message.txt
echo │Place SR Disk #3 in Boot Drive │ >> %2\message.txt
echo │for the following operations: │ >> %2\message.txt
echo │ │ >> %2\message.txt
echo │FDISK.COM - Partitioning disk │ >> %2\message.txt
echo │ │ >> %2\message.txt
echo │FORMAT.COM - High Level format │ >> %2\message.txt
echo │ │ >> %2\message.txt
echo │SR.EXE - Restore your DualStor backup │ >> %2\message.txt
echo │ │ >> %2\message.txt
echo │ │ >> %2\message.txt
echo └────────────────────────────────────────────────┘ >> %2\message.txt
echo.
echo ┌────────────────────────────────────────────────┐
echo │Insert SR DISK #3 in drive %2 │
echo └────────────────────────────────────────────────┘
pause
echo ┌────────────────────────────────────────────────┐
echo │Copying files from OS/2 system directory │
echo └────────────────────────────────────────────────┘
copy %1\OS2\DLL\DOSCALL1.DLL %2 > nul
copy %1\OS2\DLL\VIOCALLS.DLL %2 > nul
copy %1\OS2\CHKDSK.COM %2 > nul
copy %1\OS2\FORMAT.COM %2\ > nul
copy %1\OS2\FDISK.COM %2\ > nul
if exist %1\OS2\DLL\KBDCALLS.DLL copy %1\OS2\DLL\KBDCALLS.DLL %2\ >nul
if exist %1\OS2\DLL\NLS.DLL copy %1\OS2\DLL\NLS.DLL %2\ >nul
echo ┌────────────────────────────────────────────────┐
echo │Checking and copying HPFS files │
echo └────────────────────────────────────────────────┘
if exist %1\OS2\HPFS.IFS copy %1\OS2\HPFS.IFS %2\ >nul
if exist %1\OS2\DLL\UHPFS.DLL copy %1\OS2\DLL\UHPFS.DLL %2\ >nul
echo ┌────────────────────────────────────────────────┐
echo │Copying files from DualStor directory │
echo └────────────────────────────────────────────────┘
copy IPCRGUI.DLL %2\ >nul
copy IPBB.DLL %2\ >nul
copy IPBP.DLL %2\ >nul
copy IPMB.DLL %2\ >nul
copy IPNWUTIL.DLL %2\ >nul
copy IPQUAL.DLL %2\ >nul
copy IPRST.DLL %2\ >nul
copy IPUCGEN.DLL %2\ >nul
copy SR.EXE %2\ >nul
cls
echo.
echo ┌────────────────────────────────────────────────┐
echo │ MakeSR Complete │
echo └────────────────────────────────────────────────┘
GOTO Done
:InvalidLocal
echo This script must be run from your DualStor directory. Change your
echo working directory to the DualStor directory and run MakeSR again.
echo.
goto :Done
:InvalidSystem
echo '%1' - Invalid system drive. Your OS/2 system drive must be specified.
echo.
goto :Done
:NoREXX
cls
echo ************************** WARNING !! ******************************
echo REXX is not installed on your '%1' system drive. Starting with MakeSR
echo version 2.03 (starting with DualStor version 2.01) you need REXX installed
echo for MakeSR to retrieve the correct keyboard.dcp statement from your hard
echo file config.sys. If you press any key, MakeSR will continue and SR
echo disk 2 will have the statement 'devinfo=kbd,us,keyboard.dcp'. If the
echo 'us' parameter in this statement does not match your statement in your
echo hard file config.sys then you must manually edit the config.sys on SR
echo disk 2 to change the 'us' to your parameter before booting the SR disks.
echo.
echo If you do not wish to continue with MakeSR because REXX is not installed,
echo simply press CTRL-C to quit MakeSR and refer to your OS/2 documentation
echo on how to install REXX.
echo.
echo Press CTRL-C to QUIT
echo or
pause
goto :CheckTarget
:InvalidTarget
echo '%2' - Invalid target. A floppy drive must be specified.
echo.
goto :Done
:ParmErr
echo usage: makesr [OS/2 System Drive] [Target Floppy Drive]
echo.
echo For example: makesr C: A:
echo.
goto :Done
:Done