home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / wrpstrt7.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-05-26  |  6KB  |  218 lines

  1. /* Begin Install.CMD for WarpStart */
  2. '@Echo off'
  3. adummy = ''
  4. say ''
  5. say ''
  6. say 'Welcome to WarpStart:'
  7. say 'This program will copy the WarpStart files to a directory on your'
  8. say 'hard drive.  it will then creat a folder on the desktop for you.'
  9. say 'It will NOT change your system in any way.'
  10. say ''
  11. dummy = charout(,'Do you wish to continue with this install? [y/N] ')
  12. parse upper pull adummy
  13. if left(adummy,1) \= 'Y' then do
  14.   exit
  15. end
  16. adummy = ''
  17.  
  18. curdir = directory()
  19.  
  20. do
  21.     say ''
  22.     say 'Please enter the drive letter to install WarpStart (Ex. C:)'
  23.     say 'You MUST enter the full drive letter, C: <- Notice the colon'
  24.     say '--'
  25.     parse upper pull dummy
  26.     ADDRESS CMD dummy
  27.     ADDRESS CMD "CD\"
  28.     ADDRESS CMD "MD WarpStrt 2>NUL"
  29.     ADDRESS CMD "CD WarpStrt"
  30.     olddir = curdir
  31.     curdir = dummy'\WarpStrt'
  32.     say ''
  33.     say 'Current sub-directory: 'curdir
  34.     say ''
  35.     say 'Install WarpStart into the current'
  36.     dum = charout(, 'sub-directory? [Y/n] ')
  37.     parse upper pull dummy
  38.     if left(dummy,1) = 'N' then exit
  39.     say ''
  40. end
  41.  
  42. say ''
  43. say 'Installing WarpStart, copying files.. Please wait...'
  44.  
  45. no_obje = 12
  46. InsCmd.1 = copy olddir'\IBMWW.INF'
  47. InsCmd.2 = copy olddir'\INSTALL.CMD'
  48. InsCmd.3 = copy olddir'\OWTD.INF'
  49. InsCmd.4 = copy olddir'\pcmtable.inf'
  50. InsCmd.5 = copy olddir'\tricks.inf'
  51. InsCmd.6 = copy olddir'\WarpCon.txt'
  52. InsCmd.7 = copy olddir'\WARPFAQ.INF'
  53. InsCmd.8 = copy olddir'\WarpPerf.TXT'
  54. InsCmd.9 = copy olddir'\WarpStrt.Me'
  55. InsCmd.10 = copy olddir'\WarpStrt.ICO'
  56. InsCmd.11 = copy olddir'\NICWC30.TXT'
  57. InsCmd.12 = copy olddir'\WPSTUTOR.TXT'
  58.  
  59. /* add cleanup rotuine */
  60. if olddir \= curdir then
  61. do
  62.   do obje=1 to no_obje
  63.      ADDRESS CMD InsCmd.obje
  64.   end
  65. end
  66.  
  67. /* load rexx utility functions */
  68.  
  69. rc = stream('WARPFAQ.INF','c','query exists')
  70. if rc = '' then
  71. do
  72.   say 'Sorry, WARPFAQ.INF not found.  Must not be right directory. Terminating.'
  73.   exit
  74. end
  75.  
  76. say ''
  77. say 'If you see any SYS### errors from this point on, please ignore them'
  78. say ''
  79.  
  80. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  81. call SysLoadFuncs
  82.  
  83. /* say it, then do it */
  84.  
  85. say "Creating WarpStart folder..."
  86.  
  87. /* first, create WarpStart folder */
  88.  
  89. title = "Warp Start"
  90. classname = 'WPFolder'
  91. location = '<WP_DESKTOP>'
  92. setup = 'OBJECTID=<WarpStart_Folder>;OPEN=DEFAULT;ICONFILE='curdir'\WarpStrt.ico'
  93. result=SysCreateObject(classname,title,location,setup,f)
  94.  
  95. /* If folder exists, ask before updating */
  96.  
  97. if result = 0 then
  98. do
  99.   existed = 'TRUE'
  100.   say ''
  101.   say 'The WarpStart folder already exists.'
  102.   dum = Charout(, 'Do you really want to create a duplicate? [Y/n] ')
  103.   parse upper pull dummy
  104.   if left(dummy,1) = 'N' then
  105.   do
  106.     rc = stream('WARPFAQ.INF','c','query exists')
  107.     if rc = '' then
  108.     do
  109.       say 'Sorry, WarpFAQ.INF not found.  Unarchive does not appear to have '
  110.       say 'been successful.'
  111.       exit
  112.     end
  113.  
  114.     do
  115.       say ''
  116.       say 'Install appears to have been sucessful!'
  117.       say ''
  118.     end
  119.  
  120.     say 'Heres to a succesful Warp Start'
  121.     say ''
  122.  
  123.  
  124.     exit
  125.   end
  126.   say ''
  127. end
  128.  
  129. say "Creating objects in WarpStart folder..."
  130.  
  131. /* now, create program objects in Warp Start folder */
  132.  
  133. title = "Welcome to Warp Start"
  134. classname = 'WPProgram'
  135. location = '<WarpStart_Folder>'
  136. setup = 'EXENAME='E.EXE';STARTUPDIR='curdir';PARAMETERS='WarpStrt.Me''
  137. call SysCreateObject classname,title,location,setup,u
  138.  
  139. title = "OS/2 Warp Frequently Asked Questions"
  140. classname = 'WPProgram'
  141. location = '<WarpStart_Folder>'
  142. setup = 'EXENAME='VIEW.EXE';STARTUPDIR='curdir';PARAMETERS='WARPFAQ.INF''
  143. call SysCreateObject classname,title,location,setup,u
  144.  
  145. title = "IBM World Wide Electronic Resource Guide"
  146. classname = 'WPProgram'
  147. location = '<WarpStart_Folder>'
  148. setup = 'EXENAME='VIEW.EXE';STARTUPDIR='curdir';PARAMETERS='IBMWW.INF''
  149. call SysCreateObject classname,title,location,setup,u
  150.  
  151. title = "OS/2 Warp Troubleshooting Demystified"
  152. classname = 'WPProgram'
  153. location = '<WarpStart_Folder>'
  154. setup = 'EXENAME='VIEW.EXE';STARTUPDIR='curdir';PARAMETERS='OWTD.INF''
  155. call SysCreateObject classname,title,location,setup,u
  156.  
  157. title = "OS/2 Hardware Compatibilty List"
  158. classname = 'WPProgram'
  159. location = '<WarpStart_Folder>'
  160. setup = 'EXENAME='VIEW.EXE';STARTUPDIR='curdir';PARAMETERS='pcmtable.INF''
  161. call SysCreateObject classname,title,location,setup,u
  162.  
  163. title = "Stupid OS/2 Tricks"
  164. classname = 'WPProgram'
  165. location = '<WarpStart_Folder>'
  166. setup = 'EXENAME='VIEW.EXE';STARTUPDIR='curdir';PARAMETERS='tricks.INF''
  167. call SysCreateObject classname,title,location,setup,u
  168.  
  169. title = "OS/2 Warp Connect Tips and Tricks"
  170. classname = 'WPProgram'
  171. location = '<WarpStart_Folder>'
  172. setup = 'EXENAME='E.EXE';STARTUPDIR='curdir';PARAMETERS='WarpCon.TXT''
  173. call SysCreateObject classname,title,location,setup,u
  174.  
  175. title = "Performance Tuning OS/2 Warp"
  176. classname = 'WPProgram'
  177. location = '<WarpStart_Folder>'
  178. setup = 'EXENAME='E.EXE';STARTUPDIR='curdir';PARAMETERS='WarpPerf.TXT''
  179. call SysCreateObject classname,title,location,setup,u
  180.  
  181. title = "Adapter Support Matrix for OS/2 Warp Connect"
  182. classname = 'WPProgram'
  183. location = '<WarpStart_Folder>'
  184. setup = 'EXENAME='E.EXE';STARTUPDIR='curdir';PARAMETERS='NICWC30.TXT''
  185. call SysCreateObject classname,title,location,setup,u
  186.  
  187. title = "Using The Workplace Shell - A Tutorial for the New OS/2 User"
  188. classname = 'WPProgram'
  189. location = '<WarpStart_Folder>'
  190. setup = 'EXENAME='E.EXE';STARTUPDIR='curdir';PARAMETERS='WPSTUTOR.TXT''
  191. call SysCreateObject classname,title,location,setup,u
  192.  
  193.  
  194.   do
  195.     rc = stream('WARPFAQ.INF','c','query exists')
  196.     if rc = '' then
  197.     do
  198.       say 'Sorry, WarpFAQ.INF not found.  Unarchive does not appear to have '
  199.       say 'been successful.'
  200.       exit
  201.     end
  202.  
  203.  
  204. do
  205.   say ''
  206.   say 'Install appears to have been sucessful!'
  207.   say ''
  208. end
  209.  
  210.  
  211.   say ''
  212.  
  213. end
  214.  
  215. say 'Heres to a succesful Warp Start'
  216.  
  217. /* END Install Program */
  218.