home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 281.img / SU25-1.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1990-08-31  |  4KB  |  134 lines

  1. echo off
  2. cls
  3. rem --- make sure the user specified a drive letter (we allow A to K)
  4. rem     for both the source and dest drives.
  5. if %1a == a goto noDriveSpecified
  6. if %1 == a: goto checkDest
  7. if %1 == A: goto checkDest
  8. if %1 == b: goto checkDest
  9. if %1 == B: goto checkDest
  10. if %1 == c: goto checkDest
  11. if %1 == C: goto checkDest
  12. if %1 == d: goto checkDest
  13. if %1 == D: goto checkDest
  14. if %1 == e: goto checkDest
  15. if %1 == E: goto checkDest
  16. if %1 == f: goto checkDest
  17. if %1 == F: goto checkDest
  18. if %1 == g: goto checkDest
  19. if %1 == G: goto checkDest
  20. if %1 == h: goto checkDest
  21. if %1 == H: goto checkDest
  22. if %1 == i: goto checkDest
  23. if %1 == I: goto checkDest
  24. if %1 == j: goto checkDest
  25. if %1 == J: goto checkDest
  26. if %1 == k: goto checkDest
  27. if %1 == K: goto checkDest
  28. goto notOnThatDrive
  29. :checkDest
  30. if %2a == a goto noDriveSpecified
  31. if %1 == a: goto begin
  32. if %1 == A: goto begin
  33. if %1 == b: goto begin
  34. if %1 == B: goto begin
  35. if %2 == c: goto begin
  36. if %2 == C: goto begin
  37. if %2 == d: goto begin
  38. if %2 == D: goto begin
  39. if %2 == e: goto begin
  40. if %2 == E: goto begin
  41. if %2 == f: goto begin
  42. if %2 == F: goto begin
  43. if %2 == g: goto begin
  44. if %2 == G: goto begin
  45. if %1 == h: goto begin
  46. if %1 == H: goto begin
  47. if %1 == i: goto begin
  48. if %1 == I: goto begin
  49. if %1 == j: goto begin
  50. if %1 == J: goto begin
  51. if %1 == k: goto begin
  52. if %1 == K: goto begin
  53. :begin
  54. echo ╔═══════════════════════════════════════════════════════════════════════╗
  55. echo ║                                                                       ║
  56. echo ║              STORMOVIK: THE SU-25 SOVIET ATTACK FIGHTER               ║
  57. echo ║                        Hard Disk Installation                         ║
  58. echo ║                                                                       ║
  59. echo ║ This will create a directory called \SU25 on drive %2 and will        ║
  60. echo ║ install the STORMOVIK files in that directory.                        ║
  61. echo ║                                                                       ║
  62. echo ║ If you do not wish to install STORMOVIK at this time, press           ║
  63. echo ║ Ctrl-Break then press the 'Y' key.                                    ║
  64. echo ║                                                                       ║
  65. echo ╚═══════════════════════════════════════════════════════════════════════╝
  66. pause
  67.  
  68. rem --- create \SU25 on dest drive.
  69. echo 
  70. echo Creating directory %2\SU25
  71. if not exist %2\SU25\*.* goto go_on
  72. rem --- \SU25 directory already exists.
  73. :directoryExists
  74. echo 
  75. echo There is already a \SU25 directory on drive %2.  If you don't want to
  76. echo install STORMOVIK into that directory, press Ctrl-Break.
  77. echo Otherwise, press any key to continue with the install.
  78. pause
  79. goto go_on2
  80. :go_on
  81. md %2\SU25
  82. :go_on2
  83.  
  84. rem --- make sure the source drive contains Disk One
  85. :1
  86. if exist %1\SU25.0 goto 2
  87. echo 
  88. echo Insert your STORMOVIK Disk One in drive %1
  89. pause
  90. goto 1
  91. :2
  92.  
  93. rem --- copy program disk files, including next batch file, to dest disk.
  94. echo 
  95. echo Copying STORMOVIK Disk One...
  96. copy %1\*.* %2\SU25
  97. if not exist %2\SU25\install2.bat goto Error1
  98.  
  99. rem --- run next batch file
  100. %2\SU25\install2 %1 %2
  101.  
  102. rem --- user didn't specify a drive letter followed by a colon.
  103. :noDriveSpecified
  104. echo 
  105. echo Installation Error:  To install STORMOVIK, you must specify the drive
  106. echo containing the floppies that you are installing FROM, and the drive
  107. echo you are installing TO.  For example: if you are installing from
  108. echo floppy drive A: to hard drive C:, then you should type
  109. echo     INSTALL A: C:
  110. echo ...and press Enter.
  111. goto errorDone
  112.  
  113. rem --- user specified invalid drive letter.
  114. :notOnThatDrive
  115. echo 
  116. echo Installation Error: Each drive letter must be a letter from A to H,
  117. echo and must be followed by a colon.  For example, "INSTALL A: C:" will
  118. echo install STORMOVIK from floppies on drive A: to hard drive C:.
  119. goto errorDone
  120.  
  121. rem --- general installation error.
  122. :Error1
  123. echo 
  124. echo Installation Error: could not find all of the STORMAVIK files
  125. echo on disk %2\SU25. Perhaps there is not enough free space on drive %2
  126. echo The STORMOVIK installation requires at least 1000K of free disk space.
  127. goto errorDone
  128.  
  129. rem --- goto here after an error is detected, to print a message and exit.
  130. :errorDone
  131. echo 
  132. echo STORMOVIK was not installed correctly.
  133. :done
  134.