home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac_os2 / blankr42.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-08-31  |  6KB  |  185 lines

  1. /* Screen Blanker 4.2 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.2 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( 'CLIPCHAR.DOC', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: BLANKER.EXE not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'BLANKER.HLP', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: BLANKER.HLP not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Result = SysFileTree( 'BLANKER.DLL', 'Files', 'F' )
  36. If Files.0 = 0 Then
  37.   Do
  38.   Say 'ERROR: BLANKER.DLL not found! Installation cancelled.'
  39.   Signal DONE
  40.   End
  41. Result = SysFileTree( 'BLANKER.INI', 'Files', 'F' )
  42. If Files.0 = 0 Then
  43.   Do
  44.   Say 'ERROR: BLANKER.INI not found! Installation cancelled.'
  45.   Signal DONE
  46.   End
  47. Result = SysFileTree( 'PRINTQ.DLL', 'Files', 'F' )
  48. If Files.0 = 0 Then
  49.   Do
  50.   Say 'ERROR: PRINTQ.DLL not found! Installation cancelled.'
  51.   Signal DONE
  52.   End
  53. Result = SysFileTree( 'BLANKER.BMP', 'Files', 'F' )
  54. If Files.0 = 0 Then
  55.   Do
  56.   Say 'ERROR: BLANKER.BMP not found! Installation cancelled.'
  57.   Signal DONE
  58.   End
  59. Result = SysFileTree( 'BLANKER.DOC', 'Files', 'F' )
  60. If Files.0 = 0 Then
  61.   Do
  62.   Say 'ERROR: BLANKER.DOC not found! Installation cancelled.'
  63.   Signal DONE
  64.   End
  65. Result = SysFileTree( 'FORTUNES.DAT', 'Files', 'F' )
  66. If Files.0 = 0 Then
  67.   Do
  68.   Say 'ERROR: FORTUNES.DAT not found! Installation cancelled.'
  69.   Signal DONE
  70.   End
  71. Result = SysFileTree( 'BOUNCE.BSS', 'Files', 'F' )
  72. If Files.0 = 0 Then
  73.   Do
  74.   Say 'ERROR: BOUNCE.BSS not found! Installation cancelled.'
  75.   Signal DONE
  76.   End
  77. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  78. If Files.0 = 0 Then
  79.   Do
  80.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  81.   Signal DONE
  82.   End
  83. Say 'Please enter the full name of the directory to which'
  84. Say 'you want Screen Blanker installed (default C:\OS2\APPS): '
  85. Pull Directory
  86. If Directory = "" Then Directory = 'C:\OS2\APPS'
  87. Result = SysFileTree( Directory, 'Dirs', 'D' )
  88. If Dirs.0 = 0 Then
  89.   Do
  90.   Result = SysMkDir( Directory )
  91.   if Result == 0 Then
  92.     Do
  93.     End
  94.   Else
  95.     Do
  96.     Say 'ERROR: Unable to create target directory. Installation cancelled.'
  97.     Signal DONE
  98.     End
  99.   End
  100. Say ''
  101. Say 'Do you wish to install the program object in the startup folder? (Y/N)'
  102. Pull YesNo
  103. If YesNo = "Y" Then
  104.   Do
  105.   Folder = '<WP_START>'
  106.   Say 'Object will be placed in the startup folder.'
  107.   End
  108. Else
  109.   Do
  110.   Folder = '<WP_DESKTOP>'
  111.   Say 'Object will be placed on the desktop.'
  112.   End
  113. Say ''
  114. Say 'Copying BLANKER.EXE to' Directory '...'
  115. Copy BLANKER.EXE Directory                  '1>NUL'
  116. Say 'Copying CLIPCHAR.EXE to' Directory '...'
  117. Copy CLIPCHAR.EXE Directory                  '1>NUL'
  118. Say 'Copying CLIPCHAR.DOC to' Directory '...'
  119. Copy CLIPCHAR.DOC Directory                  '1>NUL'
  120. Say 'Copying BLANKER.HLP to' Directory '...'
  121. Copy BLANKER.HLP Directory                  '1>NUL'
  122. Say 'Copying BLANKER.DLL to' Directory '...'
  123. Copy BLANKER.DLL Directory                  '1>NUL'
  124. Say 'Copying BLANKER.INI to' Directory '...'
  125. Copy BLANKER.INI Directory                  '1>NUL'
  126. Say 'Copying PRINTQ.DLL to' Directory '...'
  127. Copy PRINTQ.DLL Directory                  '1>NUL'
  128. Say 'Copying BLANKER.BMP to' Directory '...'
  129. Copy BLANKER.BMP Directory                  '1>NUL'
  130. Say 'Copying BLANKER.DOC to' Directory '...'
  131. Copy BLANKER.DOC Directory                  '1>NUL'
  132. Say 'Copying FORTUNES.DAT to' Directory '...'
  133. Copy FORTUNES.DAT Directory                 '1>NUL'
  134. Say 'Copying BOUNCE.BSS to' Directory '...'
  135. Copy BOUNCE.BSS Directory                   '1>NUL'
  136. Say 'Copying LICENSE.TXT to' Directory '...'
  137. Copy LICENSE.TXT Directory                  '1>NUL'
  138. Say 'Copying Deskpic screen saver modules to' Directory '...'
  139. Copy EYES.DSS Directory                     '1>NUL'
  140. Copy FIRE.DSS Directory                     '1>NUL'
  141. Copy MELT.DSS Directory                     '1>NUL'
  142. Copy OS22BOUN.DSS Directory                 '1>NUL'
  143. Copy PUZZLE.DSS Directory                   '1>NUL'
  144. Copy RAIN.DSS Directory                     '1>NUL'
  145. Copy SMARTIES.DSS Directory                 '1>NUL'
  146. Copy SPHERES.DSS Directory                  '1>NUL'
  147. Copy STRING.DSS Directory                   '1>NUL'
  148. Copy SWARM.DSS Directory                    '1>NUL'
  149. Copy MELT.DSS Directory                     '1>NUL'
  150. Copy WALL.DSS Directory                     '1>NUL'
  151. Say ''
  152. Say 'Creating program objects...'
  153. Say ''
  154. Type = 'WPProgram'
  155. Title = 'Screen Blanker'
  156. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\BLANKER.EXE;PARAMETERS=-;STARTUPDIR='Directory';OBJECTID=<BLANKER>;NOPRINT=YES;'
  157. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  158. If Result = 1 Then
  159.   Type = 'WPProgram'
  160.   Title = 'Clipchar'
  161.   Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\CLIPCHAR.EXE;STARTUPDIR='Directory';OBJECTID=<CLIPCHAR>;NOPRINT=YES;'
  162.   Folder = '<WP_DESKTOP>'
  163.   Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  164.   If Result = 1 Then
  165.     Say 'Screen Blanker and Clipchar were installed.'
  166.     Say 'Make sure that' Directory 'is included in'
  167.     Say 'the LIBPATH statement in your CONFIG.SYS file.'
  168.     E BLANKER.DOC '1>NUL'
  169.   Exit
  170.   Else
  171.     Say 'ERROR: Unable to create object. Installation cancelled.'
  172.   Exit
  173.  
  174. FAILURE:
  175. Say 'Installation error.'
  176. Signal DONE
  177. HALT:
  178. Say 'Installation error.'
  179. Signal DONE
  180. SYNTAX:
  181. Say 'Installation error.'
  182. Signal DONE
  183. DONE:
  184. Exit
  185.