home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR16 / FLXTXT22.ZIP / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1993-08-20  |  1KB  |  73 lines

  1. /* FlexText installation REXX script */
  2. SAY " "
  3. SAY "      * * * FlexText version 2.2 * * *"
  4. SAY " "
  5. SAY "This procedure installs FlexText on your hard disk "
  6. SAY "and OS/2 desktop."
  7. SAY " "
  8. SAY 'Hit any key to continue (or "C" to cancel)...'
  9. PULL hitcancel
  10.  
  11. IF hitcancel = c
  12. THEN
  13.    EXIT
  14.  
  15. DO UNTIL mdok = Y
  16.     CALL makedir
  17. END
  18.  
  19.  
  20. COPY "*.*" SUBDIR
  21.  
  22. IF rc=0
  23. THEN NOP
  24. ELSE
  25.   DO
  26.   SAY "Fatal error copying program to Target!"
  27.   EXIT
  28.   END
  29.  
  30. SAY "Creating desktop object..."
  31.  
  32. Call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  33. Call SysLoadFuncs;
  34. RetCode = SysCreateObject( "WPProgram", "FlexText", "<WP_DESKTOP>", "EXENAME="subdir"\flxts.exe;STARTUPDIR="subdir)
  35.  
  36. SAY " "
  37. SAY "Installation complete!  The FlexText object can now be "
  38. SAY "found on your desktop."
  39. SAY " "
  40. SAY "Hit any key to continue..."
  41. PULL nothing
  42. EXIT
  43.  
  44. makedir:
  45. SAY " "
  46. SAY " "
  47. SAY "Enter the drive and subdirectory to install FlexText"
  48. SAY " or hit enter for C:\FLXT."
  49. PULL subdir
  50.  
  51. IF subdir=" "
  52. THEN subdir = "C:\FLXT"
  53. ELSE NOP
  54. MD subdir
  55.  
  56. SELECT
  57.    WHEN rc=0
  58.     THEN mdok=Y
  59.    WHEN rc = 1
  60.     THEN DO
  61.          SAY " "
  62.          SAY "Directory already exists. Should we use it? (Y/N)"
  63.          PULL mdok
  64.          END
  65.    WHEN rc > 1
  66.     THEN DO
  67.          SAY "Fatal error trying to make directory!"
  68.          EXIT
  69.          END
  70. END
  71.  
  72. RETURN
  73.