home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / install / instcpip.cmd < prev    next >
Encoding:
Text File  |  1994-03-01  |  3.7 KB  |  114 lines

  1. /***********************************************************************/
  2. /* RUNPROG                                                             */
  3. /*                                                                     */
  4. /* Purpose: Uses XCOPY to install all files from a sub directory       */
  5. /*          into a user specified destination directory.               */
  6. /*                                                                     */
  7. /* Parameters: BootDrive: Drive letter where system boots              */
  8. /*             Install Drive: Drive letter and path of CDROM           */
  9. /*             Program Name: fully qualified Name of the program to run*/
  10. /*             Flag:    parameter for the program.                     */
  11. /***********************************************************************/
  12. /*                (C) Copyright IBM Corporation 1994                   */
  13. /***********************************************************************/
  14. parse upper arg Ctl.!BDr Ctl.!CDr Ctl.!ProgName Ctl.!RunProgName Ctl.!flag
  15. trace 'o'
  16. call on halt
  17. Globals = 'Ctl.' 'RXCADD.'
  18.  
  19. call Initialize
  20.  
  21. if RxCaDD.OpType = 'REMOVE'
  22.   then do
  23.     call 'MessageBox' Ctl.!ProgName, 'Remove is not supported.  Add the application',
  24.          'again to recreate the program object.'
  25.     call 'CaDDExit'
  26.     exit 0
  27.   end  /* Do */
  28.  
  29. if substr(Ctl.!BDr,2, 1) <> ':' | substr(Ctl.!CDr,2,1) <> ':'
  30.   then call MyExit 302
  31. Ctl.!CurDir = directory()
  32. call directory(Ctl.!CurDir)
  33. call RunProgram
  34.  
  35. call 'CaddComplete' 12
  36. call 'CaddExit'
  37.  
  38. call MyExit 0
  39. exit
  40.  
  41. Initialize: procedure expose (Globals)
  42. CurDir = directory()
  43. call directory Ctl.!CDr'INSTALL'
  44. call Rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
  45. ver = 'CAddInit'()
  46. /* Ctl.!Quiet = (wordpos('/N', Ctl.!Options) <> 0) */
  47. return 0
  48.  
  49.  
  50. RunProgram: procedure expose (Globals)
  51. '@ECHO OFF'
  52. value = ' '
  53. LAPS='LAPS'
  54. TCPIP='TCPIP'
  55. Select
  56. when Ctl.!ProgName = LAPS then do
  57.  
  58. say '┌────────────────────────────────────────────────────────────────────────┐'
  59. say '│                                                                        │'
  60. say '│                LAN Adapter and Protocol Service                        │'
  61. say '│                                                                        │'
  62. say '└────────────────────────────────────────────────────────────────────────┘'
  63. pause
  64. Ctl.!RunProgName
  65. End
  66.  
  67. when Ctl.!ProgName = TCPIP Then do
  68. say '┌────────────────────────────────────────────────────────────────────────┐'
  69. say '│                                                                        │'
  70. say '│      Please ensure that LAPS has been installed first                  │'
  71. say '│                                                                        │'
  72. say '│      before proceeding with TCPIP installation,                        │'
  73. say '│      please refer to the READ.ME file on the                           │'
  74. say '│            \COMM\TCPIP\TCPIP directory                                 │'
  75. say '│                                                                        │'
  76. say '└────────────────────────────────────────────────────────────────────────┘'
  77. pause
  78. Ctl.!RunProgName
  79. End
  80.  
  81. Otherwise Do
  82. '@call 'Ctl.!RunProgName
  83. End
  84. End
  85.  
  86. Resp = rc
  87. if Resp \= 0
  88.   then call MyExit 301
  89. return 0
  90.  
  91. MyExit: procedure expose (Globals)
  92. parse arg Resp
  93.  
  94. select
  95.   when Resp = 301
  96.     then do
  97.       call 'MessageBox' Ctl.!ProgName, 'Could not find 'Ctl.!ProgName'.'
  98.     end /* Do */
  99.   when Resp = 302
  100.     then do
  101.       call 'MessageBox' Ctl.!ProgName,'Could not find OS/2 2.0 Boot Drive or CD-ROM path.',
  102.                         'Make sure that INSTALL was run from the drive letter of the CD-ROM.'
  103.     end  /* Do */
  104.   otherwise
  105.     nop
  106. end  /* select */
  107. exit Resp
  108.  
  109.  
  110. halt:
  111.  
  112. call MyExit 2
  113. return
  114.