home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / tcmail.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-10-08  |  2KB  |  99 lines

  1. /* TSR MAIL INSTALL */
  2.  
  3. '@Echo Off'
  4.  
  5. /* Set the installed object's title. */
  6.  
  7. Title = 'TSR Mail 4c'
  8.  
  9.  
  10. /* Load REXXUTIL */
  11.  
  12. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  13. Call SysLoadFuncs
  14.  
  15.  
  16. /* Initialize */
  17.  
  18. Signal On Failure Name FAILURE
  19. Signal On Halt Name HALT
  20. Signal On Syntax Name SYNTAX
  21.  
  22. Call SysCls
  23. Say 'Installing TSR MAIL...'
  24. Say ''
  25.  
  26.  
  27. /* Verify the existence of the various component files. */
  28.  
  29. Language = 'ENGLISH'
  30.  
  31. Result = SysFileTree( 'TCMAIL.EXE', 'Files', 'F' )
  32. If Files.0 = 0 Then
  33.   Do
  34.   Say 'ERROR: TCMAIL.EXE not found!'
  35.   Signal DONE
  36.   End
  37.  
  38. /* Ask for the target directory name. */
  39.  
  40. Say 'Please enter the full name of the directory to which'
  41. Say '  you want TCMAIL installed (default C:\OS2\APPS): '
  42. Pull Directory
  43. If Directory = "" Then Directory = 'C:\OS2\APPS'
  44.  
  45.  
  46. /* Create the target directory if necessary. */
  47.  
  48. Result = SysFileTree( Directory, 'Dirs', 'D' )
  49. If Dirs.0 = 0 Then
  50.   Do
  51.   Result = SysMkDir( Directory )
  52.   if Result == 0 Then
  53.     Do
  54.     End
  55.   Else
  56.     Do
  57.     Say 'ERROR: Unable to create target directory.'
  58.     Signal DONE
  59.     End
  60.   End
  61. Say ''
  62.  
  63.  
  64. /* Perform the installation. */
  65.  
  66. Say 'Copying TSR MAIL to ' Directory '...'
  67. Copy TCMAIL.EXE Directory                   '1>NUL'
  68. Copy TCMAIL.HLP Directory            '1>NUL'
  69.  
  70. Say 'Creating program object...'
  71. Type = 'WPProgram'
  72. Folder = '<WP_DESKTOP>'
  73.  
  74. Parms = 'EXENAME='Directory'\TCMAIL.EXE;STARTUPDIR='Directory
  75.  
  76. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  77.  
  78. If Result = 1 Then
  79.   Say 'Object created!  Done.'
  80. Else             
  81.   Say 'ERROR: Object not created.'
  82.  
  83. Signal DONE
  84.  
  85. FAILURE:
  86. Say 'REXX failure.'
  87. Signal DONE
  88.  
  89. HALT:
  90. Say 'REXX halt.'
  91. Signal DONE
  92.  
  93. SYNTAX:
  94. Say 'REXX syntax error.'
  95. Signal DONE
  96.  
  97. DONE:
  98. Exit
  99.