home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / gw / gwusc2.exe / GWPAT2.EXE / DOPATCH.BAT next >
DOS Batch File  |  1995-08-29  |  6KB  |  178 lines

  1. @ECHO OFF
  2.  
  3. REM
  4. REM Make sure all the 'patch kit' files exist
  5. REM
  6.  
  7. set checkfile=patch.exe
  8. if not exist %checkfile%  goto pfilemissing
  9. set checkfile=span.exe    
  10. if not exist %checkfile%  goto pfilemissing
  11. set checkfile=spanx.exe   
  12. if not exist %checkfile%  goto pfilemissing
  13. set checkfile=sqp.exe     
  14. if not exist %checkfile%  goto pfilemissing
  15. set checkfile=kdel.exe     
  16. if not exist %checkfile%  goto pfilemissing
  17. set checkfile=fixdate2.exe     
  18. if not exist %checkfile%  goto pfilemissing
  19. set checkfile=dospnset.bat
  20. if not exist %checkfile%  goto pfilemissing
  21. set checkfile=ofwin41.bat 
  22. if not exist %checkfile%  goto pfilemissing
  23. set checkfile=wnusid41.bat
  24. if not exist %checkfile%  goto pfilemissing
  25. set checkfile=gwusc2.rtp  
  26. if not exist %checkfile%  goto pfilemissing
  27. set checkfile=ofwin41.rtp 
  28. if not exist %checkfile%  goto pfilemissing
  29. set checkfile=wnusid41.rtp
  30. if not exist %checkfile%  goto pfilemissing
  31.  
  32. REM
  33. REM Attempt to verify that a proper domain directory was provided. 
  34. REM
  35.  
  36. if not exist %1\wpoffice\setupwin.exe goto wrongdir
  37.  
  38. REM
  39. REM Attempt to verify that domain has GroupWise 4.1a installed.
  40. REM
  41.  
  42. set checkfile=%1\wpoffice\ofwin40\wpof0019.ver
  43. if not exist %checkfile% goto wrongver
  44. set checkfile=%1\wpoffice\ofwin40\ofus0019.ver
  45. if not exist %checkfile% goto wrongver
  46. set checkfile=%1\wpoffice\ofwin40\readme.win  
  47. if not exist %checkfile% goto wrongver
  48. set checkfile=%1\wpoffice\ofwin40\setup.dat   
  49. if not exist %checkfile% goto wrongver
  50. set checkfile=%1\wpoffice\ofwin40\setupus.exe 
  51. if not exist %checkfile% goto wrongver
  52.  
  53. set checkfile=%1\wpoffice\ofwin40\setup\ofwin4
  54. if not exist %checkfile%1.spn goto wrongver
  55. set checkfile=%1\wpoffice\ofwin40\setup\ofwin4
  56. if not exist %checkfile%1.s01 goto wrongver
  57. set checkfile=%1\wpoffice\ofwin40\setup\ofwin4
  58. if not exist %checkfile%1.s02 goto wrongver
  59. set checkfile=%1\wpoffice\ofwin40\setup\ofwin4
  60. if not exist %checkfile%1.s03 goto wrongver
  61. set checkfile=%1\wpoffice\ofwin40\setup\ofwin4
  62. if not exist %checkfile%1.s04 goto wrongver
  63.  
  64. set checkfile=%1\wpoffice\ofwin40\setup\wnusid
  65. if not exist %checkfile%41.spn goto wrongver
  66. set checkfile=%1\wpoffice\ofwin40\setup\wnusid
  67. if not exist %checkfile%41.s01 goto wrongver
  68. set checkfile=%1\wpoffice\ofwin40\setup\wnusid
  69. if not exist %checkfile%41.s02 goto wrongver
  70. set checkfile=%1\wpoffice\ofwin40\setup\wnusid
  71. if not exist %checkfile%41.s03 goto wrongver
  72. set checkfile=%1\wpoffice\ofwin40\setup\wnusid
  73. if not exist %checkfile%41.s04 goto wrongver
  74.  
  75. REM
  76. ECHO !!! Patching files in the domain's WPOFFICE\OFWIN40 directory.
  77. REM
  78.  
  79. if exist %1\WPOFFICE\OFWIN40\PATCH.ERR del %1\WPOFFICE\OFWIN40\PATCH.ERR
  80. patch -q %1\WPOFFICE\OFWIN40 GWUSC2.RTP
  81. if exist %1\WPOFFICE\OFWIN40\PATCH.ERR goto patcherr
  82.  
  83. REM -------------------------------------------------
  84. REM Fix files in the OFWIN41 span set.
  85. REM -------------------------------------------------
  86.  
  87. mkdir tmp
  88.  
  89. call dospnset %1 OFWIN41
  90. if exist tmp\patch.err goto PATCHERR2
  91.  
  92.  
  93. REM -------------------------------------------------
  94. REM Fix files in the WNUSID41 span set.
  95. REM -------------------------------------------------
  96.  
  97. call dospnset %1 WNUSID41
  98. if exist tmp\patch.err goto PATCHERR2
  99.  
  100. rmdir tmp
  101.  
  102. echo *******************************************************
  103. echo *
  104. echo *  The patch has finished.
  105. echo *
  106. echo *******************************************************
  107.  
  108. goto exit
  109.  
  110. :pfilemissing
  111. echo *******************************************************
  112. echo *  The following file required by the patch is missing:
  113. echo *
  114. echo *   %checkfile%
  115. echo *
  116. echo *  The following files are required to perform the 
  117. echo *  patch.  Please make sure all these files exist in
  118. echo *  the current directory before doing the patch.
  119. echo *
  120. echo *    patch.exe 
  121. echo *    span.exe
  122. echo *    spanx.exe
  123. echo *    sqp.exe
  124. echo *    kdel.exe
  125. echo *    fixdate2.exe
  126. echo *    ofwin41.bat
  127. echo *    wnusid41.bat
  128. echo *    dospnset.bat
  129. echo *    gwusc2.rtp
  130. echo *    ofwin41.rtp
  131. echo *    wnusid41.rtp
  132. echo *
  133. echo *******************************************************
  134. goto exit
  135.  
  136. :wrongdir
  137. echo *******************************************************
  138. echo * SETUPWIN.EXE not found in %1\WPOFFICE directory.
  139. echo * Ensure that a correct domain directory was specified
  140. echo * and that Windows GroupWise 4.1a has been installed.
  141. echo *******************************************************
  142. goto exit
  143.  
  144. :wrongver
  145. echo *******************************************************
  146. echo * The following file was missing from the domain:
  147. echo *
  148. echo *  %checkfile%
  149. echo *
  150. echo * Ensure that Windows GroupWise 4.1a has previously
  151. echo * been installed for the domain and that patch #1 has
  152. echo * been applied.
  153. echo *******************************************************
  154. goto exit
  155.  
  156. :patcherr
  157. echo **************************************************************
  158. echo * A warning or error occurred while attempting to patch files.
  159. echo * The patch will be aborted and original files will be
  160. echo * preserved.  Please examine the PATCH.ERR file in the
  161. echo * domain\WPOFFICE\OFWIN40 directory for an explanation
  162. echo * of the patch error encountered.  Correct the problem and
  163. echo * retry the patch.
  164. echo **************************************************************
  165.  
  166. :patcherr2
  167. echo **************************************************************
  168. echo * A patch error occured attempting to patch files in a span
  169. echo * set.  The patch has been aborted.
  170. echo * Examine the .\TMP\PATCH.ERR file for an explanation of
  171. echo * the error.  Correct the problem and retry the patch.
  172. echo * (It may be necessary to reinstall GroupWise 4.1a to the
  173. echo * domain directory.).
  174. echo **************************************************************
  175.  
  176. :exit
  177. set checkfile=
  178.