home *** CD-ROM | disk | FTP | other *** search
/ OK PC 29 / OKPC29.iso / stdemo / install.bat < prev    next >
DOS Batch File  |  1993-08-11  |  5KB  |  133 lines

  1. echo off
  2. rem --- install for SEAL Team Demo
  3. cls
  4. rem --- make sure the user specified a valid drive letter (we allow A to H)
  5. rem --- for both the source and dest drives.
  6. if %1a == a goto noDriveSpecified
  7. if %1 == a: goto checkSource
  8. if %1 == A: goto checkSource
  9. if %1 == b: goto checkSource
  10. if %1 == B: goto checkSource
  11. if %1 == c: goto checkSource
  12. if %1 == C: goto checkSource
  13. if %1 == d: goto checkSource
  14. if %1 == D: goto checkSource
  15. if %1 == e: goto checkSource
  16. if %1 == E: goto checkSource
  17. if %1 == f: goto checkSource
  18. if %1 == F: goto checkSource
  19. if %1 == g: goto checkSource
  20. if %1 == G: goto checkSource
  21. if %1 == h: goto checkSource
  22. if %1 == H: goto checkSource
  23. goto notOnThatDrive
  24. :checkSource
  25. if %2a == a goto noDriveSpecified
  26. if %2 == c: goto begin
  27. if %2 == C: goto begin
  28. if %2 == d: goto begin
  29. if %2 == D: goto begin
  30. if %2 == e: goto begin
  31. if %2 == E: goto begin
  32. if %2 == f: goto begin
  33. if %2 == F: goto begin
  34. if %2 == g: goto begin
  35. if %2 == G: goto begin
  36. if %2 == h: goto begin
  37. if %2 == H: goto begin
  38. goto notOnThatDrive
  39. :begin
  40. echo ╔═══════════════════════════════════════════════════════════════════════╗
  41. echo ║                                                                       ║
  42. echo ║                      SEAL Team Demo Installation                      ║
  43. echo ║                                                                       ║
  44. echo ║ This will create a directory called \STDEMO on your destination       ║
  45. echo ║ drive %2 and will install SEAL Team Demo into that directory.         ║
  46. echo ║ SEAL Team Demo requires about 2 Megabytes of hard disk space.         ║
  47. echo ║                                                                       ║
  48. echo ║ If you don't want to install SEAL Team Demo now, press Ctrl-Break.    ║
  49. echo ║                                                                       ║
  50. echo ╚═══════════════════════════════════════════════════════════════════════╝
  51. pause
  52. rem ----------------------------------------------------
  53. :checkdirectory
  54. if not exist %2\STDEMO\*.* goto go_on
  55. rem --- dir already exists.
  56. :directoryExists
  57. echo 
  58. echo There is already a %2\STDEMO directory on drive %2.  If you don't
  59. echo want to install SEAL Team Demo into that directory, press Ctrl-Break.
  60. echo Otherwise, press any key to install SEAL Team Demo into %2\STDEMO.
  61. pause
  62. goto go_on2
  63. :go_on
  64. rem --- create \STDEMO on the current drive.
  65. echo.
  66. echo Creating directory %2\STDEMO...
  67. md %2\STDEMO
  68. rem ---------------------------------------------------
  69. :go_on2
  70. rem --- make sure source drive contains Disk 1
  71. :1a
  72. if exist %1\STDEMO.EXE goto 1b
  73. echo 
  74. echo Please make sure SEAL Team Demo Disk is in drive %1.
  75. pause
  76. goto 1a
  77. rem --------------------------------------------------
  78. :1b
  79. rem --- copy program disk files, including next batch file, to dest disk.
  80. echo 
  81. echo Copying SEAL Team Demo files...
  82. copy %1\*.* %2\STDEMO
  83. %2
  84. CD \STDEMO
  85. STDEMO.EXE
  86. DEL STDEMO.EXE
  87. if not exist %2\STDEMO\SETUP.BAT goto error
  88. cls
  89. call setup.bat
  90. echo SEAL Team Demo has been successfully installed to %2\STDEMO.
  91. echo To play SEAL Team Demo, switch to the %2\STDEMO directory and
  92. echo type "DEMO"
  93. echo  
  94. echo You can reconfigure SEAL Team Demo for your sound hardware
  95. echo at anytime by typing "SETUP" from the %\STDEMO directory.
  96. echo 
  97. goto done
  98. rem -------------------------------------------------
  99. rem --- user didn't specify a drive letter followed by a colon.
  100. :noDriveSpecified
  101. echo 
  102. echo Installation Error:  To install SEAL Team Demo, you must specify the drive
  103. echo containing the floppies that you are installing FROM, and the drive
  104. echo you are installing TO.  For example: if you are installing from floppy 
  105. echo drive A: to hard drive C:, then you should type, "INSTALL A: C:" and 
  106. echo press Enter.
  107. goto errorDone
  108. rem -------------------------------------------------
  109. rem --- user specified invalid drive letter.
  110. :notOnThatDrive
  111. echo 
  112. echo Installation Error: One of the specified drives could NOT be found
  113. echo on your system.
  114. echo 
  115. echo Each drive letter must be a letter from A to H, and must be followed by
  116. echo a colon.  For example, "INSTALL A: C:" will install SEAL Team Demo from
  117. echo floppies on drive A: to hard drive C:.
  118. goto errorDone
  119. rem -------------------------------------------------
  120. rem --- general installation error.
  121. :error
  122. echo 
  123. echo Installation Error:  Perhaps there isn't enough space on your destination
  124. echo disk.  SEAL Team Demo requires 2 Megabytes of hard disk space 
  125. goto errorDone
  126. rem -------------------------------------------------
  127. rem --- goto here after an error is detected, to print a message and exit.
  128. :errorDone
  129. echo 
  130. echo SEAL Team Demo was not installed correctly.
  131. echo Please try again.
  132. :done
  133.