home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / thcdasd.zip / LSRXINST.CMD < prev    next >
OS/2 REXX Batch file  |  1996-10-29  |  5KB  |  177 lines

  1. /* OS/2 REXX */
  2. /* (c) Steve Sharrad, 04/08/96          */
  3. /* INSTALL routine for LSRXUT.DLL       */
  4. /* Version 1.00                         */
  5. /* The HENLEY College                   */
  6.  
  7. signal on error name no_rexx
  8. call rxfuncadd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  9. call sysloadfuncs
  10. signal on error name unknown
  11. '@echo off'
  12. 'cls'
  13. say "Steve Sharrad's DASD Utilities"
  14. say "REXX/LAN API install routine version 1.00"
  15. say ' '
  16. say 'The REXX API file, LSRXUT.DLL, is a productivity'
  17. say 'aid supplied with Lan Server and is copyright IBM.'
  18. say ' '
  19. say 'BACKDASD and RESTDASD require this file to run'
  20. say 'correctly. SETDASD does not require this file.'
  21. say ' '
  22. say 'You should be running this file off your harddisk.'
  23. say ' '
  24. say 'You must be running OS/2 2.1 or above.'
  25. say 'You must be running IBM OS/2 Lan Server 4.0'
  26. say 'or IBM Warp Server 4.0 or above.'
  27. say ' '
  28. say 'The LSRXUT.DLL will be copied into the NETLIB'
  29. say 'directory.'
  30.  
  31. signal start
  32.  
  33. start:
  34. say ' '
  35. say 'Which drive does the IBMLAN tree reside on ?'
  36. pull ibmlandrive
  37. ibmlandrive=translate(ibmlandrive)
  38. if length(ibmlandrive) \= '1' then do
  39.     say 'You must enter a single drive letter !'
  40.     signal start
  41.     end
  42. ibmlanpath=ibmlandrive':\IBMLAN'
  43. signal next1
  44.  
  45. next1:
  46. s_path='a:\'
  47. say ' '
  48. say 'Is your copy of OS/2 Warp/Lan server on diskette'
  49. say 'or CD-ROM ? '
  50. say ' '
  51. say 'Press:'
  52. say '1          Diskette (Drive A) '
  53. say '2          CD-ROM'
  54. say ' '
  55. pull s_type
  56. if length(s_type) \= '1' then do
  57.     say 'You must enter either 1 or 2!'
  58.     signal next1
  59.     end
  60. if s_type = '1' then signal floppy
  61. signal getletter
  62.  
  63. getletter:
  64. say ' '
  65. say 'What drive letter is your CD-ROM of Lan Server? '
  66. pull s_letter
  67. if length(s_letter) \= '1' then do
  68.     say 'You must enter a single drive letter !'
  69.     signal next1
  70.     end
  71. s_path=s_letter':\'
  72. signal cdrom
  73.  
  74. cdrom:
  75. file=s_path'pkunzip2.exe'
  76. say 'Scanning disk...'
  77. call sysfiletree file,'tree','FSO'
  78. if tree.0 = 0 then do
  79.     say 'PKUNZIP2.EXE not found. Try again.'
  80.     signal getletter
  81.     end
  82. say 'Copying unpacker...'
  83. cline='copy 'tree.1' 'ibmlanpath'\pkunzip2.exe >nul'
  84. cline
  85.  
  86. file=s_path'lsrxut.dll'
  87. say 'Scanning disk...'
  88. call sysfiletree file,'tree','FSO'
  89. if tree.0 \= 0 then do
  90.     say 'Copying uncompressed file...'
  91.     cline='copy 'tree.1' 'ibmlanpath'\netlib\lsrxut.dll >nul'
  92.     cline
  93.     end
  94. else do
  95. file=s_path'lsrxutil.zip'
  96. call sysfiletree file,'tree','FSO'
  97. if tree.0 \= 0 then do
  98.     say 'Uncompressing file...'
  99.     cline=ibmlanpath'\pkunzip2 -o 'tree.1' 'ibmlanpath'\lsrxutil.zip >nul'
  100.     cline
  101.     say 'Copying file...'
  102.     if filefind(ibmlanpath'\lsrxut.40') then cline='copy 'ibmlanpath'\lsrxut.40 'ibmlanpath'\lsrxut.dll >nul'
  103.     if filefind(ibmlanpath'\lsrxut.dll') then cline='copy 'ibmlanpath'\lsrxut.dll 'ibmlanpath'\lsrxut.dll >nul'
  104.     cline
  105.     end
  106. else signal getletter
  107. end
  108. say ' '
  109. say 'Completed.'
  110. signal end
  111.     
  112.  
  113. floppy:
  114. say ' '
  115. say 'Insert the Productivity Aids disk 1 or the disk'
  116. say 'containing PKUNZIP2.EXE into the drive.'
  117. 'pause'
  118. file=s_path'pkunzip2.exe'
  119. if filefind(file) then do
  120.     say 'Copying unpacker...'
  121.     cline='copy 'file' 'ibmlanpath'\pkunzip2.exe >nul'
  122.     cline
  123.     end
  124. else signal floppy
  125.     
  126.  
  127. signal floppy2
  128.  
  129. floppy2:
  130. say ' '
  131. say 'Insert the Productivity Aids disk 2 or the disk'
  132. say 'containing LSRXUTIL.ZIP or LSRXUT.DLL into the'
  133. say 'drive.'
  134. 'pause'
  135. if filefind(s_path'lsrxut.dll') then do
  136.     say 'Copying uncompressed file...'
  137.     cline='copy 's_path'lsrxut.dll 'ibmlanpath'\netlib\lsrxut.dll >nul'
  138.     cline
  139.     end
  140. else do
  141. if filefind(s_path'lsrxutil.zip') then do
  142.     say 'Uncompressing file...'
  143.     cline=ibmlanpath'\pkunzip2 -o 's_path'lsrxutil.zip 'ibmlanpath
  144.     cline
  145.     say 'Copying file...'
  146.     if filefind(ibmlanpath'\lsrxut.40') then cline='copy 'ibmlanpath'\lsrxut.40 'ibmlanpath'\lsrxut.dll >nul'
  147.     if filefind(ibmlanpath'\lsrxut.dll') then cline='copy 'ibmlanpath'\lsrxut.dll 'ibmlanpath'\lsrxut.dll >nul'
  148.     cline
  149.     end
  150. else signal floppy2
  151. end
  152. say ' '
  153. say 'Completed.'
  154. signal end
  155.  
  156. filefind: Procedure
  157. return ('' \= stream( arg(1), 'c', 'query exists') )
  158. signal end
  159.  
  160. unknown:
  161. say 'An unkown error has occurred. Try install again. Check all'
  162. say 'locations that you have given are correct. If the problem'
  163. say 'still occurs, then you may copy the files manually.'
  164. signal end
  165.  
  166. no_rexx:
  167. say 'Could not initialise REXX libraries. Check that you have all OS/2'
  168. say "files installed. These utilities won't work on old versions of OS/2"
  169. say 'which do not have the Extended Sevices built in.'
  170. signal end
  171.  
  172. abort:
  173. say 'Install aborted by user.'
  174. signal end
  175.  
  176. end:
  177.