home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / instcn16.cmd < prev    next >
OS/2 REXX Batch file  |  1993-11-15  |  4KB  |  106 lines

  1. /*----------------------------------------------------------------------------*/
  2. /* INSTCNFG.CMD - ICPAUSA Software Installation Program                       */
  3. /*                                                                            */
  4. /* This program will also create the OS/2 desktop icons needed to run ICPAUSA */
  5. /*                                                                            */
  6. /* Note: REXX must be installed on the OS/2 system for this program to run.   */
  7. /*                                                                            */
  8. /* (c) Copyright International Business Machines Corp., 1993                  */
  9. /*----------------------------------------------------------------------------*/
  10. /* Registering System RexxUtil Functions.                                     */
  11. if rxFuncQuery('SysLoadFuncs') = 1 then do          /* Need to reg. REXXUTIL? */
  12.    say 'Installing System Functions '                                      
  13.    call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  14.    call SysLoadFuncs                                                       
  15.    say 'RexxUtil loaded.'
  16.    end                                                                     
  17.  
  18. Call SysCls
  19. Say
  20. Say CENTER('IIIIIIII    CCCCC    PPPPP       A      U       U    SSSSS       A   ',78)
  21. Say CENTER('   II      C     C   P    P     A A     U       U   S     S     A A  ',78)
  22. Say CENTER('   II      C         P    P    A   A    U       U   S          A   A ',78)
  23. Say CENTER('   II      C         PPPPP    AAAAAAA   U       U    SSSSS    AAAAAAA',78)
  24. Say CENTER('   II      C     C   P        A     A   U       U         S   A     A',78)
  25. Say CENTER('   II      C     C   P        A     A    U     U    S     S   A     A',78)
  26. Say CENTER('IIIIIIII    CCCCC    P        A     A     UUUUU      SSSSS    A     A',78)
  27. Say
  28. Say CENTER('ICPAUSA Installation Program   Ver 1.1',78)
  29. Say COPIES('-',78)
  30. Say
  31. Say CENTER('This program will unpack the files needed for ICPAUSA.',78)
  32. Say CENTER('and optionally create the OS/2 Desktop icons needed also.',78)
  33. Say
  34. Say CENTER('Press Enter to continue or "Q" & Enter to quit',78)
  35. Parse Upper Pull response .
  36.  
  37. If LEFT(response,1) = 'Q' Then Exit 
  38.  
  39. /* Issue commands to unpack */
  40.  
  41. ICPAUSA1 "-o"
  42. ICPAUSA2 "-o"
  43.  
  44. del systems.cfg
  45. ren systems1.cfg systems.cfg
  46. del pricing.pro
  47. ren pricing1.pro pricing.pro
  48.  
  49. Say CENTER('Create the OS/2 Desktop icons?',78)
  50. Say CENTER('Press Enter to continue or "Q" & Enter to quit',78)
  51. Parse Upper Pull response .
  52.  
  53. If LEFT(response,1) = 'Q' Then Exit 
  54.  
  55. Parse Source . . install_program_filespec
  56. install_pgm_path = FILESPEC('D',install_program_filespec)FILESPEC('P',install_program_filespec)
  57.  
  58. Say
  59. Say
  60. Say 'Creating Configurator icons...'
  61.  
  62. /* Configurator Folder */
  63. retry = 0
  64. If \SysCreateObject('WPFolder','Configurators','<WP_DESKTOP>','OBJECTID=<Configurators>') Then Do
  65.   Do retry = 1 to 10
  66.     If SysCreateObject('WPFolder','Configurators:'retry,'<WP_DESKTOP>','OBJECTID=<Configurators'retry'>') Then
  67.       Leave
  68.     End
  69.   If retry = 11 Then Do
  70.     Say '**** ERROR: Unable to create Configurators folder.'
  71.     Exit
  72.     End
  73.   End
  74.  
  75. If retry = 0 Then Do
  76.   Say '--> Configurators folder created.'
  77.   location = '<Configurators>'
  78.   End
  79. Else Do
  80.   Say '--> Configurators:'retry 'folder created.'
  81.   location = '<Configurators'retry'>'
  82.   End
  83.  
  84. /* ICPAUSA File */
  85. Do retry = 1 to 10
  86.   setup = 'OBJECTID=<ICPA16'retry'>;EXENAME='install_pgm_path'\PRCP01.EXE;STARTUPDIR='install_pgm_path
  87.   If SysCreateObject('WPProgram','ICPA16',location,setup) Then Do
  88.     Say '--> ICPA16 icon created.'
  89.     Leave
  90.     End
  91.   End
  92. If retry = 11 Then
  93.   Say '**** ERROR: Unable to create ICPAUSA icons.'
  94.  
  95. Say
  96. Say 'ICPAUSA installation program completed.'
  97.  
  98. Say CENTER('Erase the packed files from your hard disk?',78)
  99. Say CENTER('Press Enter to continue or "Q" & Enter to quit',78)
  100. Parse Upper Pull response .
  101.  
  102. If LEFT(response,1) = 'Q' Then Exit 
  103. del icpausa1.exe
  104. del icpausa2.exe
  105. Exit
  106.