home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / ptf422.exe / SSMPATCH.BAT < prev   
DOS Batch File  |  1993-09-16  |  5KB  |  170 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo.
  5. echo NetWare for SAA Services Manager v2.0.11 (PTF)
  6. echo.
  7. echo Copyright (c) 1990-1993, Novell, Inc. All Rights Reserved.
  8. echo.
  9. echo.
  10. echo STATUS: Checking PTF files ...
  11.  
  12. rem  Check that all the necessary files are in the current directory.
  13.  
  14. if not exist csm.res      goto PTFnotfound
  15. if not exist csmauth.dll  goto PTFnotfound
  16. if not exist csmres.dll   goto PTFnotfound
  17. if not exist csmvpl.dll   goto PTFnotfound
  18. if not exist nwsaa20.dll  goto PTFnotfound
  19. if not exist csmmib.dat   goto PTFnotfound
  20. if not exist ce.mib       goto PTFnotfound
  21. if not exist sna.mib      goto PTFnotfound
  22. if not exist nwsaamgr.exe goto PTFnotfound
  23. if not exist dcsmcat.exe  goto PTFnotfound
  24.  
  25. rem  Check that parameter 1 points to the SSM directory.
  26.  
  27. if exist %1\base\csm.res      goto setupSSM
  28. if %1.==.  goto defaultBoth
  29. goto help
  30.  
  31. :defaultBoth
  32. set SSM=c:\nwsaamgr
  33. set NMS=c:\nms
  34. goto SSMCheck
  35.  
  36. :setupSSM
  37. set SSM=%1
  38. goto SSMCheck
  39.  
  40. :SSMCheck
  41. if not exist %SSM%\base\csm.res      goto SSMnotfound
  42. if not exist %SSM%\base\csmauth.dll  goto SSMnotfound
  43. if not exist %SSM%\base\csmres.dll   goto SSMnotfound
  44. if not exist %SSM%\base\csmvpl.dll   goto SSMnotfound
  45. if not exist %SSM%\base\nwsaa20.dll  goto SSMnotfound
  46. if not exist %SSM%\base\csmmib.dat   goto SSMnotfound
  47.  
  48. rem  Check that parameter 2 points to the NMS directory.
  49.  
  50. if %1.==.     goto NMSCheck
  51. if %2.==.     goto defaultNMS
  52.  
  53. set NMS=%2
  54. goto NMSCheck
  55.  
  56. :defaultNMS
  57. set NMS=c:\nms
  58. goto NMSCheck
  59.  
  60. :NMSCheck
  61. set NMS20=FALSE
  62. if not exist %NMS%\bin\nwsaamgr.exe          goto NMSnotfound
  63. rem
  64. rem NMS 1.15B trap MIB files reside in a different place than
  65. rem NMS 2.0 so check both locations.
  66. rem
  67. if not exist %NMS%\snmpmibs\trapmibs\ce.mib  goto NMS115notfound
  68. if not exist %NMS%\snmpmibs\trapmibs\sna.mib goto NMSnotfound
  69. goto NMS115found
  70. :NMS115notfound
  71. if not exist %NMS%\snmpmibs\current\ce.mib  goto NMSnotfound
  72. if not exist %NMS%\snmpmibs\current\sna.mib goto NMSnotfound
  73. set NMS20=TRUE
  74. :NMS115found
  75. echo STATUS: Verifying product ...
  76.  
  77. rem  ------------------------------------------------------------
  78. rem  Now that everything is verified.
  79. rem  1) Patch the new .EXE using the one in the NMS directory.
  80. rem  2) Extract the Services list from the old .RES file.
  81. rem  3) Copy all the files from the diskette.
  82. rem  4) Catalog the old Services list into the new .RES file.
  83.  
  84. attrib -r nwsaamgr.exe
  85. ptf %NMS%\bin\nwsaamgr.exe nwsaamgr.exe
  86. if ERRORLEVEL 1  goto help
  87.  
  88. dcsmcat -xServices -n%SSM%\base\csm.res -o%SSM%\base\junk.cls
  89.  
  90. echo STATUS: Copying PTF files...
  91.  
  92. attrib -r %SSM%\base\*.*
  93. if %NMS20%==FALSE goto NMS115
  94. attrib -r %NMS%\snmpmibs\current\*.mib
  95. copy ce.mib       %NMS%\snmpmibs\current\. /v >nul
  96. copy sna.mib      %NMS%\snmpmibs\current\. /v >nul
  97. goto NMSDone
  98.  
  99. :NMS115
  100. attrib -r %NMS%\snmpmibs\trapmibs\*.mib
  101. copy ce.mib       %NMS%\snmpmibs\trapmibs\. /v >nul
  102. copy sna.mib      %NMS%\snmpmibs\trapmibs\. /v >nul
  103.  
  104. :NMSDone
  105. copy csm.res  %SSM%\base\. /v >nul
  106. copy *.dll    %SSM%\base\. /v >nul
  107. copy *.dat    %SSM%\base\. /v >nul
  108. copy nwsaamgr.exe %NMS%\bin\. /v >nul
  109. dcsmcat -a -n%SSM%\base\csm.res -i%SSM%\base\junk.cls
  110.  
  111. del %SSM%\base\junk.cls
  112.  
  113. echo STATUS: PTF Complete ...
  114. if not exist %SSM%\hostprt.10\hostprt.dll   goto NMS20Check
  115. echo.
  116. echo NOTE: %0 determined that NetWare for SAA Services Manager
  117. echo       HostPrint management was previously installed on this workstation.
  118. echo       This PTF requires that it be reinstalled from the product disks.
  119. echo.
  120.  
  121. :NMS20Check
  122. echo.
  123. if %NMS20%==FALSE goto NMSDisplay115
  124. echo NOTE: Please run the SNMP MIB Compiler from the Tools menu in
  125. echo       the NMS product to update the NetWare for SAA alarms.
  126. goto exit
  127.  
  128. :NMSDisplay115
  129. echo NOTE: Please run the SNMP Alarm Integrater from the Tools menu
  130. echo       in the NMS product for both the CE.MIB and SNA.MIB files.
  131. echo       This updates the NetWare for SAA alarms.
  132. goto exit
  133. rem  ------------------------------------------------------------
  134.  
  135.  
  136. :PTFnotfound
  137. echo.
  138. echo ERROR: Patch files appear to be missing from the current directory.
  139. goto help
  140.  
  141. :SSMnotfound
  142. echo.
  143. echo ERROR: Unable to verify that %SSM% contains the SSM product.
  144. goto help
  145.  
  146. :NMSnotfound
  147. echo.
  148. echo ERROR: Unable to verify that %NMS% contains the NMS product.
  149. goto help
  150.  
  151. :help
  152. echo.
  153. echo This program patches: NetWare for SAA Services Manager v2.0.10 (SSM)
  154. echo.
  155. echo Both the NetWare Management System (NMS) and the SSM products
  156. echo must have been previously installed on this workstation.
  157. echo.
  158. echo Switch to the drive and directory where the PTF files are located.
  159. echo Enter the directory where SSM was installed as parameter 1.
  160. echo Enter the directory where NMS was installed as parameter 2.
  161. echo.
  162. echo ex.  %0 c:\nwsaamgr c:\nms
  163. echo.
  164. goto exit
  165.  
  166. :exit
  167. set SSM=
  168. set NMS=
  169. set NMS20=
  170.