home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / thcdasd.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-11-12  |  6KB  |  174 lines

  1. /* OS/2 REXX                            */
  2. /* Steve Sharrad, 04/08/96              */
  3. /* INSTALL routine for DASD Utilities.  */
  4. /* Version 1.00                         */
  5.  
  6. signal on error name no_rexx
  7. call rxfuncadd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  8. call sysloadfuncs
  9. signal on error name unknown
  10.  
  11. 'cls'
  12. say ' '
  13. say "The HENLEY College IT Services Unit"
  14. say "Steve Sharrad's DASD Utilities - Install 1.00"
  15. say ' ' 
  16. say ' '
  17. say 'The HENLEY College - Committed to excellence in education'
  18. say 'and teaching.'
  19. say ' '
  20. say 'Visit us at http://www.henleycol.ac.uk'
  21. "pause"
  22.  
  23. 'cls'
  24. say ' '
  25. say "The HENLEY College IT Services Unit"
  26. say "Steve Sharrad's DASD Utilities - Install 1.00"
  27. say ' '
  28. say 'These utilities are designed to help network administrators'
  29. say 'manage their disk space on their IBM OS/2 LAN Servers. The'
  30. say 'utilities automate functions and APIs supplied with IBM OS/2'
  31. say 'LAN and Warp Servers and greatly improve the ease of use of'
  32. say 'the IBM DASD (direct access storage device) facilities.'
  33. say ' '
  34. say 'This software is copyright, and is also used at users own risk.'
  35. say 'For more information, see the file README.NOW.'
  36. say ' '
  37. "pause"
  38. say 'You must be running OS/2 2.1 or above.'
  39. say 'You must be running IBM OS/2 Lan Server 4.0'
  40. say 'or IBM Warp Server 4.0 or above.'
  41. say ' '
  42.  
  43. signal start
  44.  
  45. start:
  46. say ' '
  47. say 'Which drive does OS/2 reside on ?'
  48. pull os2drive
  49. os2drive=translate(os2drive)
  50. if length(os2drive) \= '1' then do
  51.     say 'You must enter a single drive letter !'
  52.     signal start
  53.     end
  54. signal next2
  55.  
  56. /*
  57. next1:
  58. say ' '
  59. say 'Which drive does the IBMLAN tree reside on ?'
  60. pull ibmlandrive
  61. ibmlandrive=translate(ibmlandrive)
  62. if length(ibmlandrive) \= '1' then do
  63.     say 'You must enter a single drive letter !'
  64.     signal next1
  65.     end
  66. signal next2
  67.  
  68. */
  69.  
  70. next2:
  71. say ' '
  72. say 'Continue with Install ?'
  73. pull yesno
  74. yesno=translate(yesno)
  75.  
  76. if yesno \= 'Y' then signal abort
  77.  
  78. say ' '
  79.  
  80. os2path=os2drive':\OS2'
  81. /* ibmlanpath=ibmlandrive':\IBMLAN' */
  82.  
  83. ibmlanpath=os2path
  84. dasdpath=os2path
  85.  
  86. call sysfiletree os2path,'tree','D'
  87. if tree.0 = 0 then do
  88.     say 'OS/2 path on 'os2drive' not found. Run Install again.'
  89.     signal end
  90.     end
  91.  
  92. call sysfiletree ibmlanpath,'tree','D'
  93. if tree.0 = 0 then do
  94.     say ibmlanpath 'path not found on 'ibmlandrive'. Run Install again.'
  95.     signal end
  96.     end
  97.  
  98. say 'Copying Install...'
  99. '@echo off'
  100. cline='copy install.cmd 'dasdpath'\install.cmd >nul'
  101. cline
  102. cline='copy lsrxinst.cmd 'dasdpath'\lsrxinst.cmd >nul'
  103. cline
  104. say 'Copying desktop files...'
  105. cline='copy backdasd.ico 'dasdpath'\backdasd.ico >nul'
  106. cline
  107. cline='copy restdasd.ico 'dasdpath'\restdasd.ico >nul'
  108. cline
  109. cline='copy setdasd.ico 'dasdpath'\setdasd.ico >nul'
  110. cline
  111. cline='copy dasd.ico 'dasdpath'\dasd.ico >nul'
  112. cline
  113. cline='copy anim.ico 'dasdpath'\anim.ico >nul'
  114. cline
  115. say 'Copying program files...'
  116. cline='copy backdasd.cmd 'dasdpath'\backdasd.cmd >nul'
  117. cline
  118. cline='copy restdasd.cmd 'dasdpath'\restdasd.cmd >nul'
  119. cline
  120. cline='copy setdasd.cmd 'dasdpath'\setdasd.cmd >nul'
  121. cline
  122. say 'Copying help files...'
  123. cline='copy backdasd.txt 'dasdpath'\backdasd.txt >nul'
  124. cline
  125. cline='copy restdasd.txt 'dasdpath'\restdasd.txt >nul'
  126. cline
  127. cline='copy setdasd.txt 'dasdpath'\setdasd.txt >nul'
  128. cline
  129. say 'Updating PM desktop...'
  130. param1='OBJECTID=<STEVEDASD>;ICONFILE='dasdpath'\DASD.ICO;ICONNFILE=1,'dasdpath'\ANIM.ICO'
  131. param2='EXENAME='os2path'\E.EXE;PARAMETERS='dasdpath'\BACKDASD.TXT; MINIMIZED=NO; PROGTYPE=PM;ICONFILE='dasdpath'\BACKDASD.ICO;ICONNFILE=1,'dasdpath'\anim.ico'
  132. param3='EXENAME='os2path'\E.EXE;PARAMETERS='dasdpath'\RESTDASD.TXT; MINIMIZED=NO; PROGTYPE=PM;ICONFILE='dasdpath'\RESTDASD.ICO;ICONNFILE=1,'dasdpath'\anim.ico'
  133. param4='EXENAME='os2path'\E.EXE;PARAMETERS='dasdpath'\SETDASD.TXT; MINIMIZED=NO; PROGTYPE=PM;ICONFILE='dasdpath'\SETDASD.ICO;ICONNFILE=1,'dasdpath'\anim.ico'
  134.  
  135. if SysCreateObject("WPFolder","Steve's DASD Utilities","<WP_DESKTOP>", param1) = '0' then say 'Not updated or desktop already updated.'
  136. if SysCreateObject("WPProgram","BACKDASD Utility", "<STEVEDASD>",param2) = '0' then say 'Not updated or desktop already updated.'
  137. if SysCreateObject("WPProgram","RESTDASD Utility", "<STEVEDASD>",param3) = '0' then say 'Not updated or desktop already updated.'
  138. if SysCreateObject("WPProgram","SETDASD Utility", "<STEVEDASD>",param4) = '0' then say 'Not updated or desktop already updated.'
  139.  
  140. say 'IMPORTANT NOTE:'
  141. say ' '
  142. say 'Before you can use the DASD utilities, you must install the REXX'
  143. say 'LAN API modules supplied as part of the productivity aids.'
  144. say '(If they are not already installed on your system).'
  145. say ' '
  146. say 'You can either run LSRXINST.CMD (which has just been installed)'
  147. say 'or you may install the file as per the instructions supplied'
  148. say 'on the Lan Server productivity aid disk.'
  149. say ' '
  150. say 'The REXX API file, LSRXUT.DLL, is a productivity'
  151. say 'aid supplied with Lan Server and is copyright IBM.'
  152. say ' '
  153. say 'Completed. Remove the disk from the diskette drive, and'
  154. say 'run LSRXINST off your harddisk, to continue.'
  155. signal end
  156.  
  157. unknown:
  158. say 'An unkown error has occurred. Try install again. Check all'
  159. say 'locations that you have given are correct. If the problem'
  160. say 'still occurs, then you may copy the files manually.'
  161. signal end
  162.  
  163. no_rexx:
  164. say 'Could not initialise REXX libraries. Check that you have all OS/2'
  165. say "files installed. These utilities won't work on old versions of OS/2"
  166. say 'which do not have the Extended Sevices built in.'
  167. signal end
  168.  
  169. abort:
  170. say 'Install aborted by user.'
  171. signal end
  172.  
  173. end:
  174.