home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / CDXTAT.ZIP / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1989-10-09  |  5.5 KB  |  177 lines

  1. echo=off
  2. rem initialize environment variable NECCDROM for later testing
  3. set neccdrom=nul
  4. cls
  5. echo INSTALL: Automatic NECHE SCSI Software Quick Installation Program Ver 1.21
  6. echo  
  7. echo Copyright (C) 1988,9 NEC Home Electronics, Inc.
  8. echo Copyright (C) 1988,9 OmniTel, Inc.
  9. echo Copyright (C) 1988,9 Trantor Systems, Ltd.
  10. echo  
  11. rem log to drive A: and check for presence of SCSI.SYS or CDROM.SYS.
  12. a:
  13. cd \
  14. if exist CDROM.SYS goto distribution
  15. echo Please insert your "NEC SCSI Distribution Diskette - Update" in
  16. echo drive A: and re-execute this INSTALL program.
  17. goto done
  18. :distribution
  19. rem Determine the target drive. If drive named, go to driveknown. Otherwise,
  20. rem prompt for drive and re-execute install batch file with parameter.
  21. if not ""=="%1" goto driveknown
  22. echo Would you like to install the NEC SCSI software on
  23. ask "your hard disk or on a floppy diskette?" "HHard disk" "FFloppy diskette" "XAbort installation"
  24. if errorlevel 3 goto abort
  25. if errorlevel 2 goto floppy
  26. echo  
  27. ask "Is you hard disk Drive C?" YYes Nno
  28. if not errorlevel 2 goto hardc
  29. echo  
  30. ask "What drive is your hard disk?" "CDrive C:" "DDrive D:" "EDrive E:" "FDrive F:" "XAbort installation"
  31. if errorlevel 5 goto abort
  32. if errorlevel 4 goto hardf
  33. if errorlevel 3 goto harde
  34. if errorlevel 2 goto hardd
  35. if errorlevel 1 goto hardc
  36. goto done
  37. :floppy
  38. echo  
  39. ask "Do you have a two floppy computer?" YYes NNo
  40. if errorlevel 2 goto onefloppy
  41. echo  
  42. echo Please insert (in Drive B:) the diskette onto which you 
  43. echo would like to install the NEC SCSI software.
  44. echo  
  45. echo Be sure that there is sufficient room on this diskette
  46. echo for the NEC SCSI software (about 140k) and that the
  47. echo diskette DOES NOT HAVE a write-protect tab.
  48. echo  
  49. pause
  50. goto gofloppy
  51. :onefloppy
  52. echo  
  53. echo You will be asked several times to swap diskettes.
  54. echo When you are asked to insert the diskette for Drive B:
  55. echo please insert the diskette onto which you are installing
  56. echo the NEC SCSI software. Be sure that there is sufficient
  57. echo room on this diskette for the NEC software (about 140K)
  58. echo and that the diskette DOES NOT HAVE a write-protect tab.
  59. echo When you are asked to insert the Diskette for Drive A:, 
  60. echo please re-insert the NEC SCSI distribution diskette.
  61. echo  
  62. pause
  63. :gofloppy
  64. install B A
  65. goto done
  66. :hardc
  67. install C C
  68. goto done
  69. :hardd
  70. install D D
  71. goto done
  72. :harde
  73. install E E
  74. goto done
  75. :hardf
  76. install F F
  77. goto done
  78. :driveknown
  79. rem erase contents of \scsi directory on target drive if it exists.
  80. rem (otherwise) create the directory and copy distribution files to it
  81. echo  
  82. cd %1:\
  83. if not exist %1:\scsi\*.* goto makedir
  84. echo A SCSI Subdirectory exists.
  85. ask "Do you wish to delete all existing files in it?" "YYes." "NNo." "XAbort Installation."
  86. if errorlevel 3 goto abort
  87. if errorlevel 2 goto dirmade
  88. del %1:\scsi\*.* < yes > nul
  89. goto dirmade
  90. :makedir
  91. md %1:\scsi
  92. :dirmade
  93. echo  
  94. echo Copying the NEC SCSI distribution files to Drive %1:
  95. echo  
  96. copy cdrom.sys %1:\scsi >nul
  97. copy scsitest.exe %1:\scsi >nul
  98. copy mscdex.exe %1:\scsi >nul
  99. copy play.exe %1:\scsi >nul
  100. copy stop.exe %1:\scsi >nul
  101. copy chkcd.exe %1:\scsi >nul
  102. rem copy config.com %1:\scsi >nul
  103. rem copy config.dat %1:\scsi >nul
  104. rem Files copied. Fix autoexec.bat and config.sys files in drive %1: if required.
  105. rem Add the MSCDEX command line to autoexec.bat
  106. echo  
  107. echo Checking your AUTOEXEC.BAT file.
  108. echo  
  109. if not exist %1:\autoexec.bat goto noauto
  110. echo  
  111. echo Making a Backup copy of your AUTOEXEC.BAT file to Subdirectory SCSI
  112. copy %1:\autoexec.bat %1:\scsi >nul
  113. :noauto
  114. tip path %1:\autoexec.bat %2:\scsi
  115. cls
  116. echo  
  117. echo  
  118. echo ========================= IMPORTANT NOTE =========================
  119. echo  
  120. echo Some applications programs insist that a CD-ROM reader be accessed
  121. echo as drive L:
  122. echo  
  123. echo You can choose to have your CD-ROM reader either assigned the drive
  124. echo letter L: or your system's next available drive letter.
  125. echo  
  126. echo Remember, you can always manually edit you AUTOEXEC.BAT file and
  127. echo assign a specific drive letter to your CD-ROM by changing the
  128. echo MSCDEX statement as described in your manual.  If you manually
  129. echo assign the drive letter, confirm that your CONFIG.SYS file has the
  130. echo appropriate LASTDRIVE statement as described in your manual.
  131. echo  
  132. ask "Assign your CD-ROM reader as drive L:?" "YYes" "NNo"
  133. if errorlevel 2 goto nextletter
  134. if errorlevel 1 if not errorlevel 2 goto letter_L
  135. echo  
  136. echo  
  137. echo  
  138. :letter_L
  139. tip mscdex %1:\autoexec.bat %2:\scsi\mscdex/d:neccd/l:L
  140. set neccdrom=driveL
  141. cls
  142. goto sysconfig
  143. :nextletter
  144. tip mscdex %1:\autoexec.bat %2:\scsi\mscdex/d:neccd
  145. :sysconfig
  146. echo  
  147. echo Checking your CONFIG.SYS file. In order to work properly
  148. echo the CONFIG.SYS file must contain a statement like
  149. echo "Device=%2:\scsi\cdrom.sys" and it may need a statment like
  150. echo "Lastdrive=M".
  151. echo  
  152. if not exist %1:\config.sys goto noconfig
  153. echo  
  154. echo Making a Backup copy of your CONFIG.SYS file to Subdirectory SCSI
  155. copy %1:\config.sys %1:\scsi >nul
  156. :noconfig
  157. tip dev %1:\config.sys %2:\scsi\cdrom.sys
  158. if %neccdrom%==driveL goto L_flag
  159. goto noflag
  160. :L_flag
  161. tip last %1:\config.sys M
  162. :noflag
  163. rem Installation should be complete.
  164. echo  
  165. echo NECHE SCSI Software Installation completed successfully.
  166. echo  
  167. echo Please re-boot computer to activate your NECHE software and CD-ROM drive.
  168. goto done
  169. :abort
  170. set neccdrom=
  171. echo  
  172. echo Automatic NECHE SCSI Software Installation aborted.
  173. :done
  174. set neccdrom=
  175. echo  
  176. 
  177.