home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / kuvertus.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-06-02  |  3KB  |  109 lines

  1. /* Kuvert/2 2.11 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 Kuvert/2 Version 2.11...'
  10. Say ''
  11. Result = SysFileTree( 'KUVERT.EXE', 'Files', 'F' )
  12. If Files.0 = 0 Then
  13.   Do
  14.   Say 'ERROR: KUVERT.EXE not found! Installation cancelled.'
  15.   Signal DONE
  16.   End
  17. Result = SysFileTree( 'KUVERT.HLP', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: KUVERT.HLP not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'PRINTQ.DLL', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: PRINTQ.DLL not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'KUVERT.DAT', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: KUVERT.DAT not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Result = SysFileTree( 'KUVERT.DOC', 'Files', 'F' )
  36. If Files.0 = 0 Then
  37.   Do
  38.   Say 'ERROR: KUVERT.DOC not found! Installation cancelled.'
  39.   Signal DONE
  40.   End
  41. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  42. If Files.0 = 0 Then
  43.   Do
  44.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  45.   Signal DONE
  46.   End
  47. Say 'Please enter the full name of the directory you want to'
  48. Say 'have Kuvert/2 installed to (default is C:\OS2\APPS): '
  49. Pull Directory
  50. If Directory = "" Then Directory = 'C:\OS2\APPS'
  51. Result = SysFileTree( Directory, 'Dirs', 'D' )
  52. If Dirs.0 = 0 Then
  53.   Do
  54.   Result = SysMkDir( Directory )
  55.   if Result == 0 Then
  56.     Do
  57.     End
  58.   Else
  59.     Do
  60.     Say 'ERROR: Unable to create directory. Installation cancelled.'
  61.     Signal DONE
  62.     End
  63.   End
  64. Folder = '<WP_DESKTOP>'
  65. Say 'The program object for Kuvert/2 is created on the Desktop.'
  66. Say ''
  67.  
  68. Say 'Copying KUVERT.EXE to' Directory '...'
  69. Copy KUVERT.EXE Directory                  '1>NUL'
  70. Say 'Copying KUVERT.HLP to' Directory '...'
  71. Copy KUVERT.HLP Directory                  '1>NUL'
  72. Say 'Copying PRINTQ.DLL to' Directory '...'
  73. Copy PRINTQ.DLL Directory                  '1>NUL'
  74. Say 'Copying KUVERT.DAT to' Directory '...'
  75. Copy KUVERT.DAT Directory                  '1>NUL'
  76. Say 'Copying KUVERT.DOC to' Directory '...'
  77. Copy KUVERT.DOC Directory                  '1>NUL'
  78. Say 'Copying LICENSE.TXT to' Directory '...'
  79. Copy LICENSE.TXT Directory                 '1>NUL'
  80. Say ''
  81. Say 'Creating program object...'
  82. Say ''
  83. Type = 'WPProgram'
  84. Title = 'Kuvert/2'
  85. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\KUVERT.EXE;STARTUPDIR='Directory';ASSOCFILTER=*.DAT;OBJECTID=<KUVERT>;NOPRINT=YES;'
  86. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  87. If Result = 1 Then
  88.   Say 'Kuvert/2 was successfully installed.'
  89.   Say 'Please make sure that the directory' Directory 'is'
  90.   Say 'listed in the LIBPATH statement of your CONFIG.SYS file.'
  91.   Say 'Please read the Extended help online information before'
  92.   Say 'using Kuvert/2.'
  93.   Exit
  94. Else
  95.   Say 'ERROR: Unable to create program object. Installation cancelled.'
  96.   Exit
  97.  
  98. FAILURE:
  99. Say 'Installation error.'
  100. Signal DONE
  101. HALT:
  102. Say 'Installation error.'
  103. Signal DONE
  104. SYNTAX:
  105. Say 'Installation error.'
  106. Signal DONE
  107. DONE:
  108. Exit
  109.