home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / tcpcsd1.zip / INSTALL.CMD < prev   
OS/2 REXX Batch file  |  1993-09-07  |  7KB  |  176 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 directory where INSTALL.CMD is located  */
  41. /*************************************************/
  42. cmdloc = getinstalldir()
  43.  
  44. /*************************/
  45. /*  Find BASE directory  */
  46. /*************************/
  47. BASE=filespec("drive",ETC)||filespec("path",ETC)
  48. if substr(BASE, length(BASE), 1) = '\' then
  49.     BASE = substr(BASE, 1, length(BASE) - 1)
  50.  
  51.  
  52.  
  53.  
  54. /***********************************/
  55. /* Unpack disk to proper directory */
  56. /***********************************/
  57. '@echo off'
  58. attrib BASE'\syslevel.bem -r'
  59. '@echo on'
  60. cmdloc'BASECSD1.EXE -o -d ' BASE'\'
  61.  
  62.  say " "
  63.  say " Please insert disk 2 of 2"
  64.  '@echo off'
  65.  pause
  66.  echo on
  67. cmdloc'BASECSD2.EXE -o -d ' BASE'\'
  68.  
  69. /**  Repeat for next disk. Remove "rems" to enable **/
  70. /* say " "
  71.  say " Please insert disk 3 of 3"
  72.  '@echo off'
  73.  pause
  74.  echo on
  75. cmdloc'BASECSD3.EXE -o -d ' BASE'\'   */
  76.  
  77. '@echo off'
  78. attrib BASE'\syslevel.bem +r'
  79. '@echo on'
  80.  
  81. /*****************************************/
  82. /* Update IBMCOM Directory if using NDIS */
  83. /*****************************************/
  84.  IBMCOM = ' '
  85.  if stream('c:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  86.    then IBMCOM='c:\ibmcom\protocol\'        /* IBMCOM on C: drive */
  87.    else
  88.     if stream('d:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  89.      then IBMCOM='d:\ibmcom\protocol\'      /* IBMCOM on D: drive */
  90.      else
  91.       if stream('e:\ibmcom\protocol\inet.sys','C','query exists') <> ''
  92.        then IBMCOM='e:\ibmcom\protocol\'    /* IBMCOM on E: drive */
  93.  
  94.  if IBMCOM <> ' '
  95.   then do
  96. /*   'BASECSD1.EXE -o ' IBMCOM' BIN\INET.SYS'       */
  97. /*   'BASECSD2.EXE -o ' IBMCOM' BIN\IFNDIS.SYS'     */
  98.  
  99.    copy  BASE'\bin\inet.sys'  IBMCOM
  100.    copy  BASE'\bin\ifndis.sys'  IBMCOM
  101.  
  102.   end
  103.   else do
  104.    say "IBMCOM directory could not be located.  If you are using the NDIS"
  105.    say "interface, you will need to copy the INET.SYS and IFNDIS.SYS     "
  106.    say "files from your tcpip\BIN directory to the IBMCOM\PROTOCOL       "
  107.    say "directory after the CSD has been applied. "
  108.   end
  109.  
  110.  
  111. loop:
  112. do until ((answer = "Y") | (answer = "N"))
  113.                        /*      Do Until User enters YES or NO */
  114. "cls"
  115. "@echo B"
  116. Say "C┌─────────────────────────────────────────────────────────┐"
  117. Say "C│Enter a Y                                                │"
  118. Say "C│                                                         │"
  119. Say "C│To install the IBM FDDI Device Driver support, or        │"
  120. Say "C│or the IBM Busmaster Ethernet Device Driver support      │"
  121. Say "C│                                                         │"
  122. Say "C│ +*+*+*+*    AND/OR                                      │"
  123. Say "C│                                                         │"
  124. Say "C│If this system being used for the OFFLOAD feature.       │"
  125. Say "C│                                                         │"
  126. Say "C│ +*+*+*+*    OTHERWISE                                   │"
  127. Say "C│                                                         │"
  128. Say "C│Enter a N                                                │"
  129. Say "C│                                                         │"
  130. Say "C│    If you are not sure, enter N                         │"
  131. Say "C│                                                         │"
  132. Say "C└─────────────────────────────────────────────────────────┘"
  133.  
  134. do until (answer <> "")
  135. parse upper pull answer
  136. end
  137. "@echo "
  138. if answer = "YES" then answer = "Y"
  139. if answer = "NO" then answer = "N"
  140. if ((answer <> "Y")  & (answer <> "N"))
  141.    then call loop
  142. end  /*    End of do until user enters Yes or No      */
  143.  
  144. "cls"
  145.  
  146. if answer = "N" then
  147.   return
  148.  
  149.  if IBMCOM <> ' '
  150.   then do
  151.     IBMCOM = substr(IBMCOM, 1, length(IBMCOM) - 9)
  152.     cmdloc'OFFLOAD.EXE -o -d 'IBMCOM
  153.   end
  154.   else do
  155.    say "The following files are for the 'OFFLOAD' feature with the       "
  156.    say "MVS or VM systems.  It is not necessary to apply these files     "
  157.    say "unless the system is used for OFFLOAD.  You must also have       "
  158.    say "installed this complete BASECSD package.                         "
  159.    say "IBMCOM directory could not be located.  You are using the NDIS   "
  160.    say "interface, you will need to install the IBMFDDI.OS2              "
  161.    say "                                        IBMFDDI.NIF              "
  162.    say "                                        IBMFDDI.BIN              "
  163.    say "                                        ENETBM.OS2               "
  164.    say "                                        ENETBM.NIF               "
  165.    say "files from the OFFLOAD diskette to the IBMCOM\MACS directory     "
  166.    say "Execute OFFLOAD.EXE with -o -d <ibmcom path> options             "
  167.    say "   ie: OFFLOAD.EXE -o -d c:\ibmcom                               "
  168.   end
  169. exit 0
  170.  
  171. getinstalldir: procedure
  172. parse source system calltype cmdloc
  173. cmddir = filespec("drive",cmdloc)||filespec("path",cmdloc)
  174. return cmddir
  175.  
  176.