home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************/
- /* RUNPROG */
- /* */
- /* Purpose: Uses XCOPY to install all files from a sub directory */
- /* into a user specified destination directory. */
- /* */
- /* Parameters: BootDrive: Drive letter where system boots */
- /* Install Drive: Drive letter and path of CDROM */
- /* Program Name: fully qualified Name of the program to run*/
- /* Flag: parameter for the program. */
- /***********************************************************************/
- /* (C) Copyright IBM Corporation 1994 */
- /***********************************************************************/
- parse upper arg Ctl.!BDr Ctl.!CDr Ctl.!ProgName Ctl.!RunProgName Ctl.!flag
- trace 'o'
- call on halt
- Globals = 'Ctl.' 'RXCADD.'
-
- call Initialize
-
- if RxCaDD.OpType = 'REMOVE'
- then do
- call 'MessageBox' Ctl.!ProgName, 'Remove is not supported. Add the application',
- 'again to recreate the program object.'
- call 'CaDDExit'
- exit 0
- end /* Do */
-
- if substr(Ctl.!BDr,2, 1) <> ':' | substr(Ctl.!CDr,2,1) <> ':'
- then call MyExit 302
- Ctl.!CurDir = directory()
- call directory(Ctl.!CurDir)
- call RunProgram
-
- call 'CaddComplete' 12
- call 'CaddExit'
-
- call MyExit 0
- exit
-
- Initialize: procedure expose (Globals)
- CurDir = directory()
- call directory Ctl.!CDr'INSTALL'
- call Rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
- ver = 'CAddInit'()
- /* Ctl.!Quiet = (wordpos('/N', Ctl.!Options) <> 0) */
- return 0
-
-
- RunProgram: procedure expose (Globals)
- '@ECHO OFF'
- value = ' '
- LAPS='LAPS'
- TCPIP='TCPIP'
- Select
- when Ctl.!ProgName = LAPS then do
-
- say '┌────────────────────────────────────────────────────────────────────────┐'
- say '│ │'
- say '│ LAN Adapter and Protocol Service │'
- say '│ │'
- say '└────────────────────────────────────────────────────────────────────────┘'
- pause
- Ctl.!RunProgName
- End
-
- when Ctl.!ProgName = TCPIP Then do
- say '┌────────────────────────────────────────────────────────────────────────┐'
- say '│ │'
- say '│ Please ensure that LAPS has been installed first │'
- say '│ │'
- say '│ before proceeding with TCPIP installation, │'
- say '│ please refer to the READ.ME file on the │'
- say '│ \COMM\TCPIP\TCPIP directory │'
- say '│ │'
- say '└────────────────────────────────────────────────────────────────────────┘'
- pause
- Ctl.!RunProgName
- End
-
- Otherwise Do
- '@call 'Ctl.!RunProgName
- End
- End
-
- Resp = rc
- if Resp \= 0
- then call MyExit 301
- return 0
-
- MyExit: procedure expose (Globals)
- parse arg Resp
-
- select
- when Resp = 301
- then do
- call 'MessageBox' Ctl.!ProgName, 'Could not find 'Ctl.!ProgName'.'
- end /* Do */
- when Resp = 302
- then do
- call 'MessageBox' Ctl.!ProgName,'Could not find OS/2 2.0 Boot Drive or CD-ROM path.',
- 'Make sure that INSTALL was run from the drive letter of the CD-ROM.'
- end /* Do */
- otherwise
- nop
- end /* select */
- exit Resp
-
-
- halt:
-
- call MyExit 2
- return
-