home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac_os2 / blankr44.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-04  |  7KB  |  210 lines

  1. /* Screen Blanker 4.4 Installation */
  2. '@Echo Off'
  3. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5. Signal On Failure Name FAILURE
  6. Signal On Halt Name HALT
  7. Signal On Syntax Name SYNTAX
  8. Call SysCls
  9. Say 'Installing Screen Blanker Version 4.4 and Clipchar 1.0...'
  10. Say ''
  11. Result = SysFileTree( 'BLANKER.EXE', 'Files', 'F' )
  12. If Files.0 = 0 Then
  13.   Do
  14.   Say 'ERROR: BLANKER.EXE not found! Installation cancelled.'
  15.   Signal DONE
  16.   End
  17. Result = SysFileTree( 'CLIPCHAR.EXE', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: BLANKER.EXE not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'DPMS.EXE', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: DPMS.EXE not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'CLIPCHAR.DOC', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: BLANKER.EXE not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Result = SysFileTree( 'BLANKER.HLP', 'Files', 'F' )
  36. If Files.0 = 0 Then
  37.   Do
  38.   Say 'ERROR: BLANKER.HLP not found! Installation cancelled.'
  39.   Signal DONE
  40.   End
  41. Result = SysFileTree( 'BLANKER.DLL', 'Files', 'F' )
  42. If Files.0 = 0 Then
  43.   Do
  44.   Say 'ERROR: BLANKER.DLL not found! Installation cancelled.'
  45.   Signal DONE
  46.   End
  47. Result = SysFileTree( 'BLANKER.INI', 'Files', 'F' )
  48. If Files.0 = 0 Then
  49.   Do
  50.   Say 'ERROR: BLANKER.INI not found! Installation cancelled.'
  51.   Signal DONE
  52.   End
  53. Result = SysFileTree( 'PRINTQ.DLL', 'Files', 'F' )
  54. If Files.0 = 0 Then
  55.   Do
  56.   Say 'ERROR: PRINTQ.DLL not found! Installation cancelled.'
  57.   Signal DONE
  58.   End
  59. Result = SysFileTree( 'BLANKER.BMP', 'Files', 'F' )
  60. If Files.0 = 0 Then
  61.   Do
  62.   Say 'ERROR: BLANKER.BMP not found! Installation cancelled.'
  63.   Signal DONE
  64.   End
  65. Result = SysFileTree( 'BLANKER.DOC', 'Files', 'F' )
  66. If Files.0 = 0 Then
  67.   Do
  68.   Say 'ERROR: BLANKER.DOC not found! Installation cancelled.'
  69.   Signal DONE
  70.   End
  71. Result = SysFileTree( 'FORTUNES.DAT', 'Files', 'F' )
  72. If Files.0 = 0 Then
  73.   Do
  74.   Say 'ERROR: FORTUNES.DAT not found! Installation cancelled.'
  75.   Signal DONE
  76.   End
  77. Result = SysFileTree( 'BOUNCE.BSS', 'Files', 'F' )
  78. If Files.0 = 0 Then
  79.   Do
  80.   Say 'ERROR: BOUNCE.BSS not found! Installation cancelled.'
  81.   Signal DONE
  82.   End
  83. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  84. If Files.0 = 0 Then
  85.   Do
  86.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  87.   Signal DONE
  88.   End
  89. Result = SysFileTree( 'EMX.DLL', 'Files', 'F' )
  90. If Files.0 = 0 Then
  91.   Do
  92.   Say 'ERROR: EMX.DLL not found! Installation cancelled.'
  93.   Signal DONE
  94.   End
  95. Result = SysFileTree( 'EMXIO.DLL', 'Files', 'F' )
  96. If Files.0 = 0 Then
  97.   Do
  98.   Say 'ERROR: EMXIO.DLL not found! Installation cancelled.'
  99.   Signal DONE
  100.   End
  101. Result = SysFileTree( 'EMXLIBC.DLL', 'Files', 'F' )
  102. If Files.0 = 0 Then
  103.   Do
  104.   Say 'ERROR: EMXLIBC.DLL not found! Installation cancelled.'
  105.   Signal DONE
  106.   End
  107. Result = SysFileTree( 'EMXWRAP.DLL', 'Files', 'F' )
  108. If Files.0 = 0 Then
  109.   Do
  110.   Say 'ERROR: EMXWRAP.DLL not found! Installation cancelled.'
  111.   Signal DONE
  112.   End
  113. Say 'Please enter the full name of the directory to which'
  114. Say 'you want Screen Blanker installed (default C:\OS2\APPS): '
  115. Pull Directory
  116. If Directory = "" Then Directory = 'C:\OS2\APPS'
  117. Result = SysFileTree( Directory, 'Dirs', 'D' )
  118. If Dirs.0 = 0 Then
  119.   Do
  120.   Result = SysMkDir( Directory )
  121.   if Result == 0 Then
  122.     Do
  123.     End
  124.   Else
  125.     Do
  126.     Say 'ERROR: Unable to create target directory. Installation cancelled.'
  127.     Signal DONE
  128.     End
  129.   End
  130. Say ''
  131. Say 'Do you wish to install the program object in the startup folder? (Y/N)'
  132. Pull YesNo
  133. If YesNo = "Y" Then
  134.   Do
  135.   Folder = '<WP_START>'
  136.   Say 'Object will be placed in the startup folder.'
  137.   End
  138. Else
  139.   Do
  140.   Folder = '<WP_DESKTOP>'
  141.   Say 'Object will be placed on the desktop.'
  142.   End
  143. Say ''
  144. Say 'Copying BLANKER.EXE to' Directory '...'
  145. Copy BLANKER.EXE Directory                  '1>NUL'
  146. Say 'Copying CLIPCHAR.EXE to' Directory '...'
  147. Copy CLIPCHAR.EXE Directory                 '1>NUL'
  148. Say 'Copying DPMS.EXE to' Directory '...'
  149. Copy DPMS.EXE Directory                 '1>NUL'
  150. Say 'Copying CLIPCHAR.DOC to' Directory '...'
  151. Copy CLIPCHAR.DOC Directory                 '1>NUL'
  152. Say 'Copying BLANKER.HLP to' Directory '...'
  153. Copy BLANKER.HLP Directory                  '1>NUL'
  154. Say 'Copying BLANKER.DLL to' Directory '...'
  155. Copy BLANKER.DLL Directory                  '1>NUL'
  156. Say 'Copying BLANKER.INI to' Directory '...'
  157. Copy BLANKER.INI Directory                  '1>NUL'
  158. Say 'Copying PRINTQ.DLL to' Directory '...'
  159. Copy PRINTQ.DLL Directory                   '1>NUL'
  160. Say 'Copying BLANKER.BMP to' Directory '...'
  161. Copy BLANKER.BMP Directory                  '1>NUL'
  162. Say 'Copying BLANKER.DOC to' Directory '...'
  163. Copy BLANKER.DOC Directory                  '1>NUL'
  164. Say 'Copying FORTUNES.DAT to' Directory '...'
  165. Copy FORTUNES.DAT Directory                 '1>NUL'
  166. Say 'Copying BOUNCE.BSS to' Directory '...'
  167. Copy BOUNCE.BSS Directory                   '1>NUL'
  168. Say 'Copying LICENSE.TXT to' Directory '...'
  169. Copy LICENSE.TXT Directory                  '1>NUL'
  170. Say 'Copying Deskpic screen saver modules to' Directory '...'
  171. Copy '*.DSS' Directory                      '1>NUL'
  172. Say 'Copying Screen Saver modules to' Directory '...'
  173. Copy '*.SSM' Directory                      '1>NUL'
  174. Say 'Copying dynamic link libraries to' Directory '...'
  175. Copy 'EMX*.DLL' Directory                   '1>NUL'
  176. Say ''
  177. Say 'Creating program objects...'
  178. Say ''
  179. Type = 'WPProgram'
  180. Title = 'Screen Blanker'
  181. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\BLANKER.EXE;PARAMETERS=-;STARTUPDIR='Directory';OBJECTID=<BLANKER>;NOPRINT=YES;'
  182. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  183. If Result = 1 Then
  184.   Type = 'WPProgram'
  185.   Title = 'Clipchar'
  186.   Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\CLIPCHAR.EXE;STARTUPDIR='Directory';OBJECTID=<CLIPCHAR>;NOPRINT=YES;'
  187.   Folder = '<WP_DESKTOP>'
  188.   Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  189.   If Result = 1 Then
  190.     Say 'Screen Blanker and Clipchar were installed.'
  191.     Say 'Make sure that' Directory 'is included in'
  192.     Say 'the LIBPATH and PATH statement in your CONFIG.SYS file.'
  193.     E BLANKER.DOC '1>NUL'
  194.   Exit
  195.   Else
  196.     Say 'ERROR: Unable to create object. Installation cancelled.'
  197.   Exit
  198.  
  199. FAILURE:
  200. Say 'Installation error.'
  201. Signal DONE
  202. HALT:
  203. Say 'Installation error.'
  204. Signal DONE
  205. SYNTAX:
  206. Say 'Installation error.'
  207. Signal DONE
  208. DONE:
  209. Exit
  210.