home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 322.img / TNTINC1.ZIP / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-10-05  |  3.5 KB  |  150 lines

  1. @echo off
  2. echo off
  3. if .%3. == .do2nd. goto do2nd
  4. cls
  5.  
  6. if %1x==x goto spellItOut
  7. if %2x==x goto spellItOut
  8.  
  9. if %1==a: goto try2nd
  10. if %1==A: goto try2nd
  11. if %1==b: goto try2nd
  12. if %1==B: goto try2nd
  13. goto unusual
  14.  
  15. :try2nd
  16. if %2==c: goto doinstall
  17. if %2==C: goto doinstall
  18. if %2==d: goto doinstall
  19. if %2==D: goto doinstall
  20. if %2==e: goto doinstall
  21. if %2==E: goto doinstall
  22.  
  23. :unusual
  24. echo Install %1 %2 is invalid.  Please use the drive's letter followed
  25. echo by a colon:
  26. goto sample
  27.  
  28. :spellItOut
  29. echo Please specify which drive to install "Tunnels & Trolls" from and to, 
  30. echo for example:
  31. :sample
  32. echo 
  33. echo         install a: c:
  34. goto end
  35.  
  36. :doinstall
  37. echo         ╔═════════════════════════════════════════════════════════════╗
  38. echo         ║                                                             ║
  39. echo         ║                         Tunnels & Trolls                    ║
  40. echo         ║                                                             ║
  41. echo         ║                    Hard Disk Install Utility                ║
  42. echo         ║                                                             ║
  43. echo         ║                                                             ║
  44. echo         ║ Tunnels & Trolls will be install on drive %2 in a directory ║
  45. echo         ║ called "TNT".  If you do not wish to do this, press Ctrl-C. ║
  46. echo         ║                                                             ║
  47. echo         ║ If all is acceptable, press any key...                      ║
  48. echo         ║                                                             ║
  49. echo         ╚═════════════════════════════════════════════════════════════╝
  50. echo 
  51. pause
  52. echo 
  53.  
  54. if exist %2\TNT\*.* goto isdir
  55. mkdir %2\TNT 
  56. goto changedir
  57.  
  58. :isdir
  59. echo WARNING:  The directory %2\TNT already exists. Press Ctrl-C if you
  60. echo           don't want to overwrite the contents of that directory.
  61. echo 
  62. pause
  63. echo 
  64.  
  65. :changedir
  66. cd %2\TNT 
  67. :docopy
  68. if exist %1\id1 goto docopy1
  69. echo Insert "Disk 1" and
  70. pause
  71. goto docopy
  72. :docopy1
  73. echo Copying "Disk 1" files to %2\TNT...
  74. copy %1\*.* %2 > nul
  75. %2
  76. install %1 %2 do2nd
  77.  
  78. :do2nd
  79. :insert2
  80. if exist %1\id2 goto docopy2
  81. echo 
  82. echo Insert "Disk 2" and
  83. pause
  84. goto insert2
  85. :docopy2
  86. echo Copying "Disk 2" files to %2\TNT...
  87. copy %1\*.* > nul
  88.  
  89. :insert3
  90. if exist %1\id3 goto docopy3
  91. echo 
  92. echo Insert "Disk 3" and
  93. pause
  94. goto insert3
  95. :docopy3
  96. echo Copying "Disk 3" files to %2\TNT...
  97. copy %1\*.* > nul
  98.  
  99. :insert4
  100. if exist %1\id4 goto docopy4
  101. echo 
  102. echo Insert "Disk 4" and
  103. pause
  104. goto insert4
  105. :docopy4
  106. echo Copying "Disk 4" files to %2\TNT...
  107. copy %1\*.* > nul
  108.  
  109. :insert5
  110. if exist %1\id5 goto docopy5
  111. echo 
  112. echo Insert "Disk 5" and
  113. pause
  114. goto insert5 
  115. :docopy5
  116. echo Copying "Disk 5" files to %2\TNT...
  117. copy %1\*.* > nul
  118.  
  119. :insert6
  120. if exist %1\id6 goto docopy6
  121. echo 
  122. echo Insert "Disk 6" and
  123. pause
  124. goto insert6
  125. :docopy6
  126. echo Copying "Disk 6" files to %2\TNT...
  127. copy %1\*.* > nul
  128.  
  129. if not exist id1 goto error
  130. if not exist id2 goto error
  131. if not exist id3 goto error
  132. if not exist id4 goto error
  133. if not exist id5 goto error
  134. if not exist id6 goto error
  135. goto success
  136.  
  137. :error
  138. echo ERROR:  Installation of "TNT" into %2\TNT was unsuccessful.  This might
  139. echo         be because your hard disk is full.  "TNT" needs at least 1,836K of
  140. echo         free disk space.
  141. goto end
  142.  
  143. :success
  144. echo 
  145. echo SUCCESS:  Installation of "TNT" into %2\TNT was successful.
  146. echo           To play TNT type: TNT
  147. echo 
  148. :end
  149. echo 
  150.