home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / OS2 / BLANK21.ZIP / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-01-06  |  4KB  |  126 lines

  1. /* Screen Blanker 2.1 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 2.1...'
  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( 'BLANKER.HLP', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: BLANKER.HLP not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'BLANKER.DLL', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: BLANKER.DLL not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'BLANKER.BMP', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: BLANKER.BMP not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Result = SysFileTree( 'BLANKER.DOC', 'Files', 'F' )
  36. If Files.0 = 0 Then
  37.   Do
  38.   Say 'ERROR: BLANKER.DOC not found! Installation cancelled.'
  39.   Signal DONE
  40.   End
  41. Result = SysFileTree( 'FORTUNES.DAT', 'Files', 'F' )
  42. If Files.0 = 0 Then
  43.   Do
  44.   Say 'ERROR: FORTUNES.DAT not found! Installation cancelled.'
  45.   Signal DONE
  46.   End
  47. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  48. If Files.0 = 0 Then
  49.   Do
  50.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  51.   Signal DONE
  52.   End
  53. Say 'Please enter the full name of the directory to which'
  54. Say 'you want Screen Blanker installed (default C:\OS2\APPS): '
  55. Pull Directory
  56. If Directory = "" Then Directory = 'C:\OS2\APPS'
  57. Result = SysFileTree( Directory, 'Dirs', 'D' )
  58. If Dirs.0 = 0 Then
  59.   Do
  60.   Result = SysMkDir( Directory )
  61.   if Result == 0 Then
  62.     Do
  63.     End
  64.   Else
  65.     Do
  66.     Say 'ERROR: Unable to create target directory. Installation cancelled.'
  67.     Signal DONE
  68.     End
  69.   End
  70. Say ''
  71. Say 'Do you wish to install the program object in the startup folder? (Y/N)'
  72. Pull YesNo
  73. If YesNo = "Y" Then
  74.   Do
  75.   Folder = '<WP_START>'
  76.   Say 'Object will be placed in the startup folder.'
  77.   End
  78. Else
  79.   Do
  80.   Folder = '<WP_DESKTOP>'
  81.   Say 'Object will be placed on the desktop.'
  82.   End
  83. Say ''
  84. Say 'Copying BLANKER.EXE to' Directory '...'
  85. Copy BLANKER.EXE Directory                  '1>NUL'
  86. Say 'Copying BLANKER.HLP to' Directory '...'
  87. Copy BLANKER.HLP Directory                  '1>NUL'
  88. Say 'Copying BLANKER.DLL to' Directory '...'
  89. Copy BLANKER.DLL Directory                  '1>NUL'
  90. Say 'Copying BLANKER.BMP to' Directory '...'
  91. Copy BLANKER.BMP Directory                  '1>NUL'
  92. Say 'Copying BLANKER.DOC to' Directory '...'
  93. Copy BLANKER.DOC Directory                  '1>NUL'
  94. Say 'Copying FORTUNES.DAT to' Directory '...'
  95. Copy FORTUNES.DAT Directory                 '1>NUL'
  96. Say 'Copying LICENSE.TXT to' Directory '...'
  97. Copy LICENSE.TXT Directory                  '1>NUL'
  98. Say ''
  99. Say 'Creating program object...'
  100. Say ''
  101. Type = 'WPProgram'
  102. Title = 'Screen Blanker'
  103. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\BLANKER.EXE;PARAMETERS=-;STARTUPDIR='Directory';OBJECTID=<BLANKER>;NOPRINT=YES;'
  104. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  105. If Result = 1 Then
  106.   Say 'Screen Blanker was successfully installed.'
  107.   Say 'Make sure that' Directory 'is included in'
  108.   Say 'the LIBPATH statement in your CONFIG.SYS file.'
  109.   Say 'Please read BLANKER.DOC for the new features of Screen Blanker 2.1.'
  110.   Exit
  111. Else
  112.   Say 'ERROR: Unable to create object. Installation cancelled.'
  113.   Exit
  114.  
  115. FAILURE:
  116. Say 'Installation error.'
  117. Signal DONE
  118. HALT:
  119. Say 'Installation error.'
  120. Signal DONE
  121. SYNTAX:
  122. Say 'Installation error.'
  123. Signal DONE
  124. DONE:
  125. Exit
  126.