home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0330 - 0339 / ibm0330-0339 / ibm0333.tar / ibm0333 / HPDRV200.ZIP / INSTDRV.BAT < prev    next >
Encoding:
DOS Batch File  |  1993-07-01  |  7.6 KB  |  176 lines

  1. @echo off
  2.  
  3. :CHECKS
  4. rem  Check if the user has input the two command line parameters.
  5. if %2x==x goto USAGE
  6.  
  7. rem  Check if the 1-2-3 program directory contains the main DDF file.
  8. if not exist %1\install.ddf goto ERROR1
  9.  
  10. rem  Check if the driver distribution disk contains the driver DDF portion.
  11. if not exist %2*.ddf goto ERROR2
  12.  
  13. cls
  14. echo ┌───────────────────────────────────────────────────────────────────────────┐
  15. echo │                                                                           │
  16. echo │                      NEW DRIVER INSTALLATION                              │
  17. echo │                      1-2-3 Release 3.1  (tm)                              │
  18. echo │                      1-2-3 Release 3.4  (tm)                              │
  19. echo │                                                                           │
  20. echo │    This procedure will install new drivers from a supplemental            │
  21. echo │    drivers distribution disk into your 1-2-3 Release 3.1 (tm)             │
  22. echo │    or 1-2-3 Release 3.4 (tm) directory and make them available            │
  23. echo │    for you to install using the Install program.                          │
  24. echo │                                                                           │
  25. echo │    Note that the copy of INSTALL.DDF in your 1-2-3 Release 3.1/3.4        │
  26. echo │    directory will be renamed to INSTALL.BAK.                              │
  27. echo │                                                                           │
  28. echo │                                                                           │
  29. echo └───────────────────────────────────────────────────────────────────────────┘
  30. echo
  31. echo
  32. echo
  33. echo
  34. echo
  35. echo
  36. echo
  37. echo
  38. pause                                                                            
  39. cls 
  40.  
  41.  
  42. :DDFAPPEND
  43. copy %1\install.ddf %1\install.bak
  44. if errorlevel 1 goto ERROR3
  45. copy %1\install.ddf+%2*.ddf %1\install.ddf
  46. if errorlevel 1 goto ERROR4
  47.  
  48.  
  49. :COPYDLD
  50. if not exist %2*.dl? goto COPYPBD
  51. copy %2*.dl? %1\*.*
  52. if errorlevel 1 goto ERROR4
  53.  
  54. :COPYPBD
  55. if not exist %2*.pbd goto COPYLRF
  56. copy %2*.pbd %1\*.*
  57. if errorlevel 1 goto ERROR4
  58.  
  59. :COPYLRF
  60. if not exist %2*.lrf goto OKEXIT
  61. copy %2*.lrf %1\*.*
  62. if errorlevel 1 goto ERROR4
  63. goto OKEXIT
  64.  
  65.  
  66. :USAGE
  67. cls
  68. echo ┌───────────────────────────────────────────────────────────────────────────┐
  69. echo │                                                                           │
  70. echo │                                                                           │
  71. echo │  To use this batch file, type:                                            │
  72. echo │                                                                           │
  73. echo │         instdrv %%1 %%2                                                     │
  74. echo │                                                                           │
  75. echo │  where %%1 is the full path name, including the drive letter of your       │
  76. echo │  1-2-3 Release 3.1/3.4 directory and %%2 is the drive letter that contains │
  77. echo │  the driver distribution disk.                                            │
  78. echo │                                                                           │
  79. echo │  For example, if your 1-2-3 Release 3.1 directory is C:\123R31\ and       │
  80. echo │  your driver distribution disk is in drive A then type:                   │
  81. echo │                                                                           │
  82. echo │        instdrv C:\123R31 A:                                               │
  83. echo │                                                                           │
  84. echo │                                                                           │
  85. echo └───────────────────────────────────────────────────────────────────────────┘
  86. echo     
  87. echo     
  88. echo     
  89. echo     
  90. echo     
  91. pause
  92. goto ERROREXIT
  93.  
  94.  
  95. :ERROR1
  96. cls
  97. echo ┌───────────────────────────────────────────────────────────────────────────┐
  98. echo │                                                                           │
  99. echo │    INSTALLATION ERROR                                                     │
  100. echo │                                                                           │
  101. echo │      Directory specified by %%1 does not contain INSTALL.DDF               │
  102. echo │                                                                           │
  103. echo │                                                                           │
  104. echo └───────────────────────────────────────────────────────────────────────────┘
  105. echo     
  106. echo     
  107. goto ERROREXIT
  108.  
  109.  
  110. :ERROR2
  111. cls
  112. echo ┌───────────────────────────────────────────────────────────────────────────┐
  113. echo │                                                                           │
  114. echo │    INSTALLATION ERROR                                                     │
  115. echo │                                                                           │
  116. echo │      Drive specified by %%2 does not contain .DDF file for new driver.     │
  117. echo │                                                                           │
  118. echo │                                                                           │
  119. echo └───────────────────────────────────────────────────────────────────────────┘
  120. echo     
  121. echo     
  122. goto ERROREXIT
  123.  
  124.  
  125. :ERROR3
  126. cls
  127. echo ┌───────────────────────────────────────────────────────────────────────────┐
  128. echo │                                                                           │
  129. echo │    INSTALLATION ERROR                                                     │
  130. echo │                                                                           │
  131. echo │      Cannot backup Install.ddf to Install.bak                             │
  132. echo │                                                                           │
  133. echo │                                                                           │
  134. echo └───────────────────────────────────────────────────────────────────────────┘
  135. echo     
  136. echo     
  137. goto ERROREXIT
  138.  
  139.  
  140. :ERROR4
  141. cls
  142. echo ┌───────────────────────────────────────────────────────────────────────────┐
  143. echo │                                                                           │
  144. echo │    INSTALLATION ERROR                                                     │
  145. echo │                                                                           │
  146. echo │      A copy error has occured.......Cleaning up                           │
  147. echo │                                                                           │
  148. echo │                                                                           │
  149. echo └───────────────────────────────────────────────────────────────────────────┘
  150. echo     
  151. echo     
  152. copy %1\install.bak %1\install.ddf
  153. del %1\install.bak
  154. goto ERROREXIT
  155.  
  156.  
  157. :OKEXIT
  158. cls
  159. echo ┌──────────────────────────────────────────────────────────────────────────┐
  160. echo │                                                                          │
  161. echo │  INSTALLATION COMPLETE                                                   │
  162. echo │                                                                          │
  163. echo │    Select Change selected equipment and either of the .DCF options to    │
  164. echo │    add the drivers to the desired .DCF configuration file. Be sure to    │
  165. echo │    save the new selections before exiting INSTALL.                       │
  166. echo │                                                                          │
  167. echo │                                                                          │
  168. echo └──────────────────────────────────────────────────────────────────────────┘
  169. echo
  170. echo     
  171.  
  172.  
  173. :ERROREXIT
  174. rem  End of Batch Program
  175. 
  176.