home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / alrmc31e.zip / acinst.cmd < prev    next >
OS/2 REXX Batch file  |  1995-12-17  |  4KB  |  107 lines

  1. /* */
  2. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. call SysLoadFuncs
  4. call SysCls
  5. pos = SysCurPos(5,0)
  6. say '┌───────────────────────────────────────────┐'
  7. say '│                                           │'
  8. say '│     Thank you for trying Alarm Clock      │'
  9. say '│                                           │'
  10. say '│ If you are upgrading from version 2.9 be  │'
  11. say '│ sure and run the conversion utility       │'
  12. say '│ AC29_31.EXE before running Alarm Clock.   │'
  13. say '│                                           │'
  14. say '│ If you are upgrading from version 3.0 be  │'
  15. say '│ sure and run the conversion utility       │'
  16. say '│ AC30_31.EXE before running Alarm Clock.   │'
  17. say '│                                           │'
  18. say '│ Your current event files will be changed  │'
  19. say '│ to the new format.  You should still      │'
  20. say '│ review and edit the entries to take       │'
  21. say '│ advantage of the new features in version  │'
  22. say '│ 3.1.                                      │'
  23. say '│                                           │'
  24. say '│ Press any key to continue...              │'
  25. say '│                                           │'
  26. say '└───────────────────────────────────────────┘'
  27. call SysGetKey 'NOECHO'
  28. call SysCls
  29. pos = SysCurPos(5,0)
  30. say 'Enter the target drive and directory then press <ENTER>'
  31. PULL targdrv
  32. say ' '
  33. say 'Enter the source drive and directory then press <ENTER>'
  34. PULL srcepath
  35. say ' '
  36. say 'Installing Alarm Clock in 'targdrv
  37. call STARTINSTALL
  38. call INSTALRMCLK
  39. say ' '
  40. say '┌───────────────────────────────────────────┐'
  41. say '│                                           │'
  42. say '│       Alarm Clock INSTALLED               │'
  43. say '│                                           │'
  44. say '│ Be sure that the selected directory is in │'
  45. say '│ your LIBPATH= statement or .\ is in the   │'
  46. say '│ LIBPATH.  See your CONFIG.SYS file.       │'
  47. say '│                                           │'
  48. say '└───────────────────────────────────────────┘'
  49. exit
  50.  
  51.  
  52.  
  53.  
  54.  
  55. STARTINSTALL:
  56.    call SysFileTree srcepath, 'file', 'D'
  57.    if file.0 = 0 then do
  58.        say 'No files found in 'srcepath
  59.        exit
  60.        end
  61.  
  62.    call SysFileTree targdrv, 'file', 'D'
  63.    if file.0 = 0 then do
  64.       call CREATEPATH
  65.       end  /* Do */
  66. return /* STARTINSTALL */
  67.  
  68.  
  69. INSTALRMCLK:
  70.    "@echo off"
  71.    copy srcepath'\*.* 'targdrv
  72.    settings='OBJECTID=<ALARMCLK_FOLDER>;ICONFILE='srcepath'\folder.ico'
  73.    call SysCreateObject 'WPFolder', 'Alarm Clock', '<WP_DESKTOP>', settings, 'REPLACE'
  74.    settings='PROGTYPE=PM;EXENAME='targdrv'\ALRMCLK2.EXE;OBJECTID=<ALRMCLK2>;STARTUPDIR='targdrv
  75.    call SysCreateObject 'WPProgram', 'Alarm Clock', '<ALARMCLK_FOLDER>', settings, 'REPLACE'
  76.    settings='PROGTYPE=PM;EXENAME=VIEW.EXE;OBJECTID=<ACHELP>;STARTUPDIR='targdrv';PARAMETERS=ALRMCLK2.INF'
  77.    call SysCreateObject 'WPProgram', 'Alarm Clock Help', '<ALARMCLK_FOLDER>', settings, 'REPLACE'
  78.    echo on
  79. return
  80.  
  81. CREATEPATH:
  82.  
  83.    do I = 1 to 5 by 1
  84.       say ' '
  85.       say 'Press Y to create the directory 'targdrv
  86.       say 'Press N to end the install'
  87.       rc = SysGetKey()
  88.       say ' '
  89.       say ' '
  90.       select
  91.           when TRANSLATE(rc) = 'Y' then do
  92.               rc = SysMkDir(targdrv)
  93.               if rc \= 0 then do
  94.                   say 'Error Creating 'targdrv
  95.                   say 'Install Ended unsuccessfully'
  96.                   beep(454, 100)
  97.                   exit
  98.                   end
  99.               leave
  100.           end  /* Do */
  101.           when TRANSLATE(rc) = 'N' then leave
  102.           otherwise beep(454, 100)
  103.       end  /* select */
  104.    end /* do */
  105.  
  106. return /* CREATEPATH */
  107.