home *** CD-ROM | disk | FTP | other *** search
/ OS/2 the Most Complete Collection / OS2_The_Most_Complete_Collection_Powersource.iso / protocol / install.cmd < prev    next >
OS/2 REXX Batch file  |  1993-07-12  |  6KB  |  157 lines

  1. /**********************************************************/
  2. /***        Install BASECSD files                       ***/
  3. /***  Files pakced with PKZIP -r -P options             ***/
  4. /***  Files self extract with -o -d options             ***/
  5. /***                                                    ***/
  6. /**********************************************************/
  7.  
  8. /* Check where to install (from SET ETC statement) */
  9. ENV = 'OS2ENVIRONMENT'
  10. ETC = VALUE('ETC',,ENV)
  11. if ETC = '' then
  12.     do
  13.     say ""
  14.     say "WARNING!"
  15.     say "You do NOT have the environment variable ETC defined!"
  16.     say "You should have already installed the OS/2 TCP/IP 1.2.1 refresh"
  17.     say "CSD installation will not continue."
  18.     say ""
  19.     exit 1
  20.     end
  21.  
  22. /*  User CNTRL.EXE instructions  */
  23.  say " This CSD cannot replace executables or DLL's that are in use."
  24.  say " Be sure to stop all active TCP/IP services before installing this CSD."
  25.  say " "
  26.  say " CNTRL.EXE was updated in this CSD upgrade.  This will require  "
  27.  say " you to REM out the RUN=C:\TCPIP\BIN\CNTRL.EXE line in your     "
  28.  say " CONFIG.SYS and reboot before installing this CSD.  After"
  29.  say " installing this CSD be sure to remove the REM from the"
  30.  say " RUN=C:\TCPIP\BIN\CNTRL.EXE and reboot again."
  31.  say " "
  32.  say " If you have not already added the REM to your CONFIG.SYS, press"
  33.  say " CNTRL-C to abort this CMD file.  Otherwise press any other key to"
  34.  say " continue."
  35.  '@echo off'
  36.  pause
  37.  echo on
  38.  
  39. /*************************/
  40. /*  Find BASE directory  */
  41. /*************************/
  42. BASE=filespec("drive",ETC)||filespec("path",ETC)
  43. if substr(BASE, length(BASE), 1) = '\' then
  44.     BASE = substr(BASE, 1, length(BASE) - 1)
  45.  
  46.  
  47.  
  48.  
  49. /***********************************/
  50. /* Unpack disk to proper directory */
  51. /***********************************/
  52. '@echo off'
  53. attrib BASE'\syslevel.bem -r'
  54. '@echo on'
  55. TCPCSD1.EXE '-o -d ' BASE'\'
  56. attrib BASE'\syslevel.bem +r'
  57.  
  58.  say " "
  59.  say " Please insert disk 2 of 2"
  60.  '@echo off'
  61.  pause
  62.  echo on
  63. 'TCPCSD2.EXE -o -d ' BASE'\'
  64.  
  65. /**  Repeat for next disk. Remove "rems" to enable **/
  66. /* say " "
  67.  say " Please insert disk 3 of 3"
  68.  '@echo off'
  69.  pause
  70.  echo on
  71. TCPCSD3.EXE '-o -d ' BASE'\'   */
  72.  
  73. /*****************************************/
  74. /* Update IBMCOM Directory if using NDIS */
  75. /*****************************************/
  76.  IBMCOM = ' '
  77.  if stream('c:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  78.    then IBMCOM='c:\ibmcom\protocol\'        /* IBMCOM on C: drive */
  79.    else
  80.     if stream('d:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  81.      then IBMCOM='d:\ibmcom\protocol\'      /* IBMCOM on D: drive */
  82.      else
  83.       if stream('e:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  84.        then IBMCOM='e:\ibmcom\protocol\'    /* IBMCOM on E: drive */
  85.  
  86.  if IBMCOM <> ' '
  87.   then do
  88. /*   'TCPCSD1.EXE -o ' IBMCOM' BIN\INET.SYS'       */
  89. /*   'TCPCSD2.EXE -o ' IBMCOM' BIN\IFNDIS.SYS'     */
  90.  
  91.    copy  BASE'\bin\inet.sys'  IBMCOM
  92.    copy  BASE'\bin\ifndis.sys'  IBMCOM
  93.  
  94.   end
  95.   else do
  96.    say "IBMCOM directory could not be located.  If you are using the NDIS"
  97.    say "interface, you will need to copy the INET.SYS and IFNDIS.SYS     "
  98.    say "files from your tcpip\BIN directory to the IBMCOM\PROTOCOL       "
  99.    say "directory after the CSD has been applied. "
  100.   end
  101.  
  102.  
  103. loop:
  104. do until ((answer = "Y") | (answer = "N"))
  105.                        /*      Do Until User enters YES or NO */
  106. "cls"
  107. "@echo B"
  108. Say "C┌─────────────────────────────────────────────────────────┐"
  109. Say "C│Enter a Y                                                │"
  110. Say "C│if you wish to install the FDDI support and EitherNet    │"
  111. Say "C│buss master Device Drivers,                              │"
  112. Say "C│ +*+*+*+*    AND/OR                                      │"
  113. Say "C│if this system being used for the OFFLOAD feature.      │"
  114. Say "C│                                                         │"
  115. Say "C│ +*+*+*+*    OTHERWISE                                   │"
  116. Say "C│Enter a N                                                │"
  117. Say "C│    If you are not sure, enter N                         │"
  118. Say "C│                                                         │"
  119. Say "C└─────────────────────────────────────────────────────────┘"
  120.  
  121. do until (answer <> "")
  122. parse upper pull answer
  123. end
  124. "@echo "
  125. if answer = "YES" then answer = "Y"
  126. if answer = "NO" then answer = "N"
  127. if ((answer <> "Y")  & (answer <> "N"))
  128.    then call loop
  129. end  /*    End of do until user enters Yes or No      */
  130.  
  131. "cls"
  132.  
  133. if answer = "N" then
  134.   return
  135.  
  136.  if IBMCOM <> ' '
  137.   then do
  138.     IBMCOM = substr(IBMCOM, 1, length(IBMCOM) - 9)
  139.     OFFLOAD.EXE '-o -d 'IBMCOM
  140.   end
  141.   else do
  142.    say "The following files are for the 'OFFLOAD' feature with the       "
  143.    say "MVS or VM systems.  It is not necessary to apply these files     "
  144.    say "unless the system is used for OFFLOAD.  You must also have       "
  145.    say "installed this complete BASECSD package.                         "
  146.    say "IBMCOM directory could not be located.  You are using the NDIS   "
  147.    say "interface, you will need to install the IBMFDDI.OS2              "
  148.    say "                                        IBMFDDI.NIF              "
  149.    say "                                        IBMFDDI.BIN              "
  150.    say "                                        ENETBM.OS2               "
  151.    say "                                        ENETBM.NIF               "
  152.    say "files from the OFFLOAD diskette to the IBMCOM\MACS directory     "
  153.    say "Execute OFFLOAD.EXE with -o -d <ibmcom path> options             "
  154.    say "   ie: OFFLOAD.EXE -o -d c:\ibmcom                               "
  155.   end
  156.  
  157.