home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / clipchar.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-06-30  |  2KB  |  82 lines

  1. /* Clipchar 1.0 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 Clipchar Version 1.0...'
  10. Say ''
  11. Result = SysFileTree( 'CLIPCHAR.EXE', 'Files', 'F' )
  12. If Files.0 = 0 Then
  13.   Do
  14.   Say 'ERROR: CLIPCHAR.EXE not found! Installation cancelled.'
  15.   Signal DONE
  16.   End
  17. Result = SysFileTree( 'CLIPCHAR.DOC', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: CLIPCHAR.DOC not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Say 'Please enter the full name of the directory you want to'
  30. Say 'have Clipchar installed to (default is C:\OS2\APPS): '
  31. Pull Directory
  32. If Directory = "" Then Directory = 'C:\OS2\APPS'
  33. Result = SysFileTree( Directory, 'Dirs', 'D' )
  34. If Dirs.0 = 0 Then
  35.   Do
  36.   Result = SysMkDir( Directory )
  37.   if Result == 0 Then
  38.     Do
  39.     End
  40.   Else
  41.     Do
  42.     Say 'ERROR: Unable to create directory. Installation cancelled.'
  43.     Signal DONE
  44.     End
  45.   End
  46. Folder = '<WP_DESKTOP>'
  47. Say 'The program object for Clipchar is created on the Desktop.'
  48. Say ''
  49.  
  50. Say 'Copying CLIPCHAR.EXE to' Directory '...'
  51. Copy CLIPCHAR.EXE Directory                  '1>NUL'
  52. Say 'Copying CLIPCHAR.DOC to' Directory '...'
  53. Copy CLIPCHAR.DOC Directory                  '1>NUL'
  54. Say 'Copying LICENSE.TXT to' Directory '...'
  55. Copy LICENSE.TXT Directory                 '1>NUL'
  56. Say ''
  57. Say 'Creating program object...'
  58. Say ''
  59. Type = 'WPProgram'
  60. Title = 'Clipchar'
  61. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\CLIPCHAR.EXE;STARTUPDIR='Directory';OBJECTID=<CLIPCHAR>;NOPRINT=YES;'
  62. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  63. If Result = 1 Then
  64.   Say 'Clipchar was successfully installed.'
  65.   Say 'Please read CLIPCHAR.DOC before using Kuvert/2.'
  66.   Exit
  67. Else
  68.   Say 'ERROR: Unable to create program object. Installation cancelled.'
  69.   Exit
  70.  
  71. FAILURE:
  72. Say 'Installation error.'
  73. Signal DONE
  74. HALT:
  75. Say 'Installation error.'
  76. Signal DONE
  77. SYNTAX:
  78. Say 'Installation error.'
  79. Signal DONE
  80. DONE:
  81. Exit
  82.