home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / alrmp14h.zip / APINST.CMD < prev    next >
OS/2 REXX Batch file  |  1994-04-04  |  3KB  |  92 lines

  1. /* */
  2. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. call SysLoadFuncs
  4. call SysCls
  5. pos = SysCurPos(5,0)
  6. say 'Enter the target drive and directory then press <ENTER>'
  7. PULL targdrv
  8. say ' '
  9. say 'Enter the source drive and directory then press <ENTER>'
  10. PULL srcepath
  11. say ' '
  12. say 'Installing Alarm Pro in 'targdrv
  13.  
  14. call STARTINSTALL
  15. call INSTALRMPRO
  16.    
  17.  
  18. say ' '
  19. say '┌───────────────────────────────────────────┐'
  20. say '│                                           │'
  21. say '│         Alarm Pro INSTALLED               │'
  22. say '│                                           │'
  23. say '│ Be sure that the selected directory is in │'
  24. say '│ your LIBPATH= statement or .\ is in the   │'
  25. say '│ LIBPATH.  See your CONFIG.SYS file.       │'
  26. say '│                                           │'
  27. say '└───────────────────────────────────────────┘'
  28. exit
  29.  
  30.  
  31.  
  32.  
  33.  
  34. STARTINSTALL:
  35.    call SysFileTree srcepath, 'file', 'D'
  36.    if file.0 = 0 then do
  37.        say 'Incorrect diskette in drive 'srcepath
  38.        exit
  39.        end
  40.  
  41.    call SysFileTree targdrv, 'file', 'D'
  42.    if file.0 = 0 then do
  43.       call CREATEPATH
  44.       end
  45.  
  46. return /* STARTINSTALL */
  47.  
  48.  
  49. INSTALRMPRO:
  50.    "@echo off"
  51.    copy srcepath'\*.* 'targdrv' >nul'
  52.    settings='OBJECTID=<ALARMPRO_FOLDER>;ICONFILE='srcepath'\folder.ico'
  53.    call SysCreateObject 'WPFolder', 'AlarmPro', '<WP_DESKTOP>', settings, 'REPLACE'
  54.    settings='PROGTYPE=PM;EXENAME='targdrv'\ALRMPRO.EXE;OBJECTID=<ALRMPRO>;STARTUPDIR='targdrv';CCVIEW=NO'
  55.    call SysCreateObject 'WPProgram', 'AlarmPro', '<ALARMPRO_FOLDER>', settings, 'REPLACE'
  56.    settings='PROGTYPE=PM;EXENAME='targdrv'\APIMPORT.EXE;OBJECTID=<APIMPORT>;STARTUPDIR='targdrv
  57.    call SysCreateObject 'WPProgram', 'Contact Import' , '<ALARMPRO_FOLDER>', settings, 'REPLACE'
  58.    settings='PROGTYPE=PM;EXENAME='targdrv'\APCONVTD.EXE;OBJECTID=<TDCONVRT>;STARTUPDIR='targdrv
  59.    call SysCreateObject 'WPProgram', 'Daily Planner Converter', '<ALARMPRO_FOLDER>', settings, 'REPLACE'
  60.    settings='PROGTYPE=PM;EXENAME=VIEW.EXE;OBJECTID=<APHELP>;STARTUPDIR='targdrv';PARAMETERS=ALRMPRO.INF'
  61.    call SysCreateObject 'WPProgram', 'AlarmPro Help', '<ALARMPRO_FOLDER>', settings, 'REPLACE'
  62.    echo on
  63. return
  64.  
  65.  
  66. CREATEPATH:
  67.  
  68.    do I = 1 to 5 by 1
  69.       say ' '
  70.       say 'Press Y to create the directory 'targdrv
  71.       say 'Press N to end the install'
  72.       rc = SysGetKey()
  73.       say ' '
  74.       say ' '
  75.       select
  76.           when TRANSLATE(rc) = 'Y' then do
  77.               rc = SysMkDir(targdrv)
  78.               if rc \= 0 then do
  79.                   say 'Error Creating 'targdrv
  80.                   say 'Install Ended unsuccessfully'
  81.                   beep(454, 100)
  82.                   exit
  83.                   end
  84.               leave
  85.           end  /* Do */
  86.           when TRANSLATE(rc) = 'N' then leave
  87.           otherwise beep(454, 100)
  88.       end  /* select */
  89.    end /* do */
  90.  
  91. return /* CREATEPATH */
  92.