home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / instcn32.cmd < prev    next >
OS/2 REXX Batch file  |  1994-04-19  |  4KB  |  110 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, 1994            */
  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.2',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 Signal Endit
  38.  
  39. /* Issue commands to unpack */
  40.  
  41. ICPADLR1 "-o"
  42. ICPADLR2 "-o"
  43.  
  44. Say CENTER('Create the OS/2 Desktop icons?',78)
  45. Say CENTER('Press Enter to continue or "Q" & Enter to quit',78)
  46. Parse Upper Pull response .
  47.  
  48. If LEFT(response,1) = 'Q' Then Signal Endit
  49.  
  50. Parse Source . . install_program_filespec
  51. install_pgm_path = FILESPEC('D',install_program_filespec)FILESPEC('P',install_program_filespec)
  52. Say
  53. Say
  54. Say 'Creating Configurator icons...'
  55.  
  56. /* Configurator Folder */
  57. retry = 0
  58. If \SysCreateObject('WPFolder','Configurators','<WP_DESKTOP>','OBJECTID=<Configurators>') Then Do
  59.   Do retry = 1 to 10
  60.     If SysCreateObject('WPFolder','Configurators:'retry,'<WP_DESKTOP>','OBJECTID=<Configurators'retry'>') Then
  61.       Leave
  62.     End
  63.   If retry = 11 Then Do
  64.     Say '**** ERROR: Unable to create Configurators folder.'
  65.     Exit
  66.     End
  67.   End
  68.  
  69. If retry = 0 Then Do
  70.   Say '--> Configurators folder created.'
  71.   location = '<Configurators>'
  72.   End
  73. Else Do
  74.   Say '--> Configurators:'retry 'folder created.'
  75.   location = '<Configurators'retry'>'
  76.   End
  77.  
  78. /* ICPAUSA File */
  79. Do retry = 1 to 10
  80.  
  81.   setup = 'OBJECTID=<ICPA32'retry'>;EXENAME='install_pgm_path'\ICPA32.EXE;STARTUPDIR='install_pgm_path';PARAMETERS=-a'                               
  82.   If SysCreateObject('WPProgram','ICPA32',location,setup) Then Do
  83.     Say '--> ICPA32 icon created.'
  84.     Leave
  85.     End
  86.   End
  87. /* AASFIX File */
  88. Do retry = 1 to 10
  89.   setup = 'OBJECTID=<AASVER'retry'>;EXENAME='install_pgm_path'\AASVER.CMD;STARTUPDIR='install_pgm_path
  90.   If SysCreateObject('WPProgram','AASVER',location,setup) Then Do
  91.     Say '--> AASVER icon created.'
  92.     Leave
  93.     End
  94.   End
  95. If retry = 11 Then
  96.   Say '**** ERROR: Unable to create ICPAUSA icons.'
  97.  
  98. Say
  99. Say 'ICPAUSA installation program completed.'
  100.  
  101. Endit:
  102. Say CENTER('Erase the packed files from your hard disk?',78)
  103. Say CENTER('Press Enter to continue or "Q" & Enter to quit',78)
  104. Parse Upper Pull response .
  105.  
  106. If LEFT(response,1) = 'Q' Then Exit 
  107. del icpadlr1.exe
  108. del icpadlr2.exe
  109. Exit
  110.