home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / enh_e130.zip / rebuild.cmd < prev    next >
OS/2 REXX Batch file  |  1999-12-09  |  2KB  |  64 lines

  1. /* THIS IS NOT THE INSTALLATION UTILITY! */
  2. /*                                       */
  3. /* Run only to repair desktop objects    */
  4. /* if the Enhanced E's are already       */
  5. /* installed                             */
  6. /*                                       */
  7. /*                                       */
  8. /* Desktop Object Repair                 */
  9. /* Rebuilds Enhanced E Desktop object    */
  10. /* Run this from the editor's directory  */
  11. /*                                       */
  12.  
  13. /* Load RexxUtil DLL                     */
  14. call RxFuncAdd 'SysLoadFuncs' , RexxUtil, 'SysLoadFuncs'
  15. call SysLoadFuncs
  16. Call SysCls
  17.  
  18. say 'This program is repairs the desktop objects for the Enhanced E Editors'
  19. say 'it is not the installation utility.'
  20. say
  21. say 'If you have not installed the Enhanced E with the '"'Install.exe'"' program'
  22. say 'the installation will likely fail.'
  23.  
  24. /* Is the Enhanced E in this directory?  */
  25. say 'Locating eee.exe...'
  26. if Stream('eee.exe','C','Query Exists') = '' then do
  27.    say 'Please run this program from the same directory as the eee.exe file'
  28.    say ''
  29.    say 'Exiting...'
  30.    exit
  31. end
  32.  
  33. /* Create the desktop objects            */
  34. EETitle    ='Enhanced E Editor'
  35. EESetup    ='OBJECTID=<EE>;'||,
  36.            'EXENAME=' || Directory() || '\EE.EXE;'||,
  37.            'STARTUPDIR=' || Directory()';'||,
  38.            'ASSOCTYPE=Plain Text,OS/2 Command File,DOS Command File,,;'||,
  39.            'ASSOCFILTER=*.DOC,*.TXT,,;'||,
  40.            'PROGTYPE=PM;'
  41.  
  42. EEETitle    ='Enhanced EE Editor'
  43. EEESetup    ='OBJECTID=<EEE>;'||,
  44.            'EXENAME=' || Directory() || '\EEE.EXE;'||,
  45.            'STARTUPDIR=' || Directory()';'||,
  46.            'ASSOCTYPE=Plain Text,OS/2 Command File,DOS Command File,,;'||,
  47.            'ASSOCFILTER=*.DOC,*.TXT,,;'||,
  48.            'PROGTYPE=PM;'
  49.  
  50. call SysCreateObject "WPProgram", EETitle, "<WP_DESKTOP>", EESetup, 'Update'
  51. /* Check if the WPS object was created   */
  52. if rc = 0 then
  53.    say 'Object creation for 'EETitle ' failed!  rc='rc
  54. else
  55.    say 'Object created for' EETitle '.'
  56.  
  57.  
  58. call SysCreateObject "WPProgram", EEETitle, "<WP_DESKTOP>", EEESetup, 'Update'
  59. /* Check if the WPS object was created   */
  60. if rc = 0 then
  61.    say 'Object creation for 'EEETitle ' failed!  rc='rc
  62. else
  63.    say 'Object created for' EEETitle '.'
  64.