home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if not "%OS%" == "DRDOS" goto error4
- if not "%VER%" == "6.0" goto error4
-
- echo UPDATE R3.01 DR DOS File Update Utility
- echo Copyright (c) 1990,1991 Digital Research Inc. All rights reserved.
-
- if "%1" == "/H" goto showhelp
- if "%1" == "/h" goto showhelp
- if "%1" == "/?" goto showhelp
- if "%1" == "" goto showhelp
-
- set SYSDRV=0123456789012345678901234567890123456789
- if not "%SYSDRV%" == "0123456789012345678901234567890123456789" goto error2
- set SYSDRV=
-
- if "%1"=="a:" set SYSDRV=A:
- if "%1"=="A:" set SYSDRV=A:
- if "%1"=="b:" set SYSDRV=B:
- if "%1"=="B:" set SYSDRV=B:
- if "%1"=="c:" set SYSDRV=C:
- if "%1"=="C:" set SYSDRV=C:
- if "%SYSDRV%" == "" goto error3
- set SWCH=/r
-
- if "%SYSDRV%" == "A:" goto floppy
- if "%SYSDRV%" == "B:" goto floppy
-
- set SYSDIR=DRDOS
- goto hard
-
- :floppy
- echo
- echo Updating files for a floppy based system on drive %SYSDRV%
- echo
-
- :loop0
- set DISKNAME=STARTUP
- set IDFILE=command.com
- gosub insert_disk
- gosub update_files
- if exist %SYSDRV%\install.exe copy util\setup.exe %SYSDRV%\install.exe >NUL
-
- set DSKTYPE=360
- if exist %SYSDRV%\emm386.sys set DSKTYPE=720
- if exist %SYSDRV%\lock.exe set DSKTYPE=1.2/1.44
-
- if "%DSKTYPE%" == "1.2/1.44" goto vmax_disk
-
- set DISKNAME=UTILITITES-1
- set IDFILE=emm386.sys
- if "%DSKTYPE%" == "720" set IDFILE=editor.exe
- gosub insert_disk
- gosub update_files
- if exist %SYSDRV%\install.exe copy util\setup.exe %SYSDRV%\install.exe >NUL
-
- set DISKNAME=UTILITITES-2
- set IDFILE=mem.exe
- if "%DSKTYPE%" == "720" set IDFILE=sstor.exe
- gosub insert_disk
- gosub update_files
-
- if "%DSKTYPE%" == "720" goto vmax_disk
-
- set DISKNAME=UTILITITES-3
- set IDFILE=lock.exe
- gosub insert_disk
- gosub update_files
-
- set DISKNAME=UTILITITES-4
- set IDFILE=print.com
- gosub insert_disk
- gosub update_files
-
- set DISKNAME=UTILITITES-5
- set IDFILE=recover.com
- gosub insert_disk
- gosub update_files
-
- :vmax_disk
- set DISKNAME=VIEWMAX
- set IDFILE=viewmax.exe
- gosub insert_disk
- gosub update_files
-
- :floppyend
- if not exist update.1 goto success
- gosub swap_disk
- goto loop0
-
- :hard
- if "%2" == "" goto skip1
- if "%2" == "/S" goto repall
- if "%2" == "/s" goto repall
- set SYSDIR=%2
- if "%SYSDIR%" == "\" set SYSDIR=.
-
- :skip3
- if "%3" == "/S" goto repall
- if "%3" == "/s" goto repall
- goto skip1
-
- :repall
- set SWCH=/r /s
- set SYSDIR=.
- echo
- echo WARNING: You have specified to update all copies of the relevant files
- echo on drive %SYSDRV%. UPDATE will NOT check if the files are DR DOS files.
- goto skip2
-
- :skip1
- echo
- if "%SYSDIR%" == "." echo Updating DR DOS files on drive %SYSDRV%
- if not "%SYSDIR%" == "." echo Updating DR DOS files in directory %SYSDIR% on drive %SYSDRV%
- :skip2
- echo
- echo Press CTRL-C now if this is not correct and enter UPDATE /H for more
- echo information.
- echo
- pause
-
- if "%SYSDIR%" == "." goto skiptest
- if not exist %SYSDRV%\%SYSDIR%\hidos.sys goto error
- :skiptest
-
- rem ** determine if there's a swapped sstor drive
- rem ** this will result in SET SWAPDRV=NONE or SET SWAPDRV=d:
- sstorchk
-
- :loop1
- echo Updating files...
- replace @util.fl %SYSDRV%\%SYSDIR% %SWCH% >NUL
- replace @sys.fl %SYSDRV%\ /r /h >NUL
- if not exist sys\command.com goto skip_cmd
- if not exist %COMSPEC% goto skip_cmd
- copy sys\command.com %COMSPEC% >nul
- :skip_cmd
-
- if "%SWAPDRV%" == "NONE" goto almost
- replace @util.fl %SWAPDRV%\%SYSDIR% %SWCH% >NUL
- replace @sys.fl %SWAPDRV%\ /r /h >NUL
-
- :almost
- if not exist update.1 goto success
- gosub swap_disk
- goto loop1
-
- :success
- echo
- echo UPDATE completed successfully.
- goto exit
-
- :insert_disk
- echo Insert either your master %DISKNAME% disk or your
- echo working %DISKNAME% disk in drive %SYSDRV%
- echo If it is the master disk ensure the physical write protection is removed.
- echo
- pause
- if exist %SYSDRV%\%IDFILE% return
- echo ERROR: Wrong disk in drive %SYSDRV%
- echo
- goto insert_disk
-
-
- :update_files
- echo Updating files...
- replace @util.fl %SYSDRV% /r >NUL
- replace @sys.fl %SYSDRV% /r /h >NUL
- echo
- return
-
- :swap_disk
- echo Insert Update Disk #2
- echo
- pause
- if exist update.2 return
- echo ERROR: Wrong Update Disk in drive %SYSDRV%
- echo
- goto swap_disk
-
-
- :update_files
- :error
- echo
- echo ERROR: The drive/directory specified does not contain DR DOS files.
- echo
- goto exit
-
- :error2
- echo
- echo ERROR: There is insufficient environment space to run this batch file.
- echo Increase the environment space and try again.
- echo
- goto exit
-
- :error3
- echo
- echo ERROR: Invalid drive specifier. Enter UPDATE /H for more information.
- echo
- goto exit
-
- :error4
- echo
- echo ERROR: Incompatible operating system. Update requires DR DOS 6.0.
- echo
- goto exit
-
- :showhelp
- echo
- echo UPDATE will replace DR DOS files on your hard disk or floppy disks with the
- echo updated versions contained on this floppy disk.
- echo
- echo UPDATE d: [directory] [/S]
- echo
- echo d: Drive to update. (A: B: or C:)
- echo directory Directory where DR DOS files are located.
- echo /S Update all copies of the relevant files on the hard disk specified.
- echo WARNING: This option DOES NOT check that the files being updated
- echo are DR DOS files.
- echo
- echo For example UPDATE C: OSFILES will cause the files in the directory C:\OSFILES
- echo to be updated.
- echo
- echo If you specify a floppy drive UPDATE will prompt you for each disk as it is
- echo required. The disks can be either the master disks or your working disks if
- echo if you have a twin drive floppy based system.
- echo
-
- :exit
- rem set SYSDRV=
- rem set SYSDIR=
- rem set SET720=
- rem set SWCH=
- rem set SWAPDRV=
- rem set DISKNAME=
- rem set IDFILE=
- rem set DSKTYPE=
-