home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / PAPPEND.ZIP / PAPPEND.BAT < prev    next >
Encoding:
DOS Batch File  |  1988-02-23  |  2.3 KB  |  84 lines

  1. echo off
  2. cls
  3. echo This program is used to patch the DOS program APPEND.EXE so it can be
  4. echo used with Network-OS.  It is ONLY for IBM PC-DOS 3.3.
  5. echo .
  6. echo Before using, you must have DEBUG in the current directory or in the
  7. echo path.  APPEND.EXE must be in the current dir and not write protected.
  8. echo A backup copy of APPEND.EXE will be saved in the file APPEND.UNP.
  9. echo .
  10. echo Press Control-C, then Y to abort or any other key to continue ...
  11. pause >nul
  12. rem -------------------------------------------------------------------
  13. rem - Patches 3 bytes at offset 8d3 in append.exe                     -
  14. rem - Old value = 26 88 27, New = 90 90 90                            -
  15. rem - Only for PC-DOS 3.3, append size = 5825 date = 3-17-87, 12:00p  -
  16. rem -------------------------------------------------------------------
  17. if not exist append.exe goto noappend
  18. rem tmp1 is input to debug, tmp2 is output, tmp3.$$$ is append.exe
  19. copy append.exe tmp3.$$$ >nul
  20. echo d 8d0 l6 >tmp1.$$$
  21. echo q >>tmp1.$$$
  22. if exist tmp2.$$$ del tmp2.$$$
  23. debug tmp3.$$$ <tmp1.$$$ >tmp2.$$$
  24. if not exist tmp2.$$$ goto nodebug
  25. echo .
  26. echo .
  27. echo Please confirm that the pattern ":08D0  83 C3 07 26 88 27" is
  28. echo shown below:
  29. type tmp2.$$$
  30. if exist tmp?.$$$ del tmp?.$$$
  31. echo If the pattern is not shown, press Control-C, then Y to abort.
  32. echo (If ":08D0  83 C3 07 90 90 90" is shown, APPEND is already patched)
  33. echo Otherwise, press any other key to continue ...
  34. pause >nul
  35. copy append.exe append.unp >nul
  36. rem tmp1 is input to debug, tmp3 is append.exe
  37. copy append.exe tmp3.$$$ >nul
  38. echo e 8d3 90 90 90 >tmp1.$$$
  39. echo w >>tmp1.$$$
  40. echo q >>tmp1.$$$
  41. debug tmp3.$$$ <tmp1.$$$ >nul
  42. del append.exe
  43. if exist append.exe goto wprot
  44. ren tmp3.$$$ append.exe
  45. if not exist append.exe goto renerr
  46. echo .
  47. echo .
  48. echo .
  49. echo APPEND.EXE successfully patched.  APPEND.UNP is the original.
  50. goto done
  51.  
  52. :noappend
  53. echo .
  54. echo .
  55. echo .
  56. echo ERROR: APPPEND.EXE must be in the current directory.
  57. goto done
  58.  
  59. :nodebug
  60. echo .
  61. echo .
  62. echo .
  63. echo ERROR: DEBUG not found. Copy it to current directory and retry.
  64. goto done
  65.  
  66. :wprot
  67. echo .
  68. echo .
  69. echo .
  70. echo ERROR: APPEND.EXE is write protected.  Run ATTRIB -R APPEND.EXE,
  71. echo        then retry.
  72. goto done
  73.  
  74. :renerr
  75. echo .
  76. echo .
  77. echo .
  78. echo ERROR: Cannot rename file.
  79. goto done
  80.  
  81. :done
  82. if exist tmp?.$$$ del tmp?.$$$
  83.  
  84.