home *** CD-ROM | disk | FTP | other *** search
/ The Disc (Australian) 2 / TheDiscIssue2.iso / demos / xcom / disc_int.bat next >
Encoding:
DOS Batch File  |  1995-07-11  |  2.6 KB  |  121 lines

  1. @echo off
  2. cls
  3.  
  4.  
  5. REM Check if drive exists
  6. set drive=C:
  7. if not exist %DRIVE%\nul goto ddrive
  8. disksize %DRIVE% 4000000 
  9. if not errorlevel 1 goto continue
  10.  
  11. :ddrive
  12. set drive=D:
  13. if not exist %DRIVE%\nul goto edrive
  14. disksize %DRIVE% 4000000 
  15. if not errorlevel 1 goto continue
  16.  
  17. :edrive
  18. set drive=E:
  19. if not exist %DRIVE%\nul goto fdrive
  20. disksize %DRIVE% 4000000 
  21. if not errorlevel 1 goto continue
  22.  
  23. :fdrive
  24. set drive=F:
  25. if not exist %DRIVE%\nul goto nodrive
  26. disksize %DRIVE% 4000000 
  27. if errorlevel 1 goto usage2
  28.  
  29.  
  30. :continue
  31. REM Checking for enough drive space.
  32. REM disksize %DRIVE% 4000000
  33. REM if errorlevel 1 goto usage2
  34.  
  35. REM Checking for Proper Drive
  36. if not exist tftd.zip goto usage3
  37.  
  38. REM Creating Install Directory
  39. md %DRIVE%\mps
  40. md %DRIVE%\mps\tftd
  41. if not exist %DRIVE%\mps\tftd\nul goto error1
  42.  
  43. REM Installing UPDATE Software
  44. :install
  45. pkunzip -o -d tftd %DRIVE%\mps\tftd
  46.  
  47. Rem Checking for errors
  48. if errorlevel 1 goto error2
  49.  
  50. goto end
  51.  
  52. :usage
  53. cls
  54. echo You must supply the DRIVE you wish to install the Terror From the 
  55. echo Deep demo to.
  56. echo EXAMPLE:  INSTALL C:
  57. goto EOF
  58.  
  59. :usage2
  60. cls
  61. echo The Terror From The Deep Demo Requires 4 Megabytes of Hard drive
  62. echo space to install. Drive %DRIVE% doesn't have enough space to install TFTD.
  63. echo Please free up some space on the %DRIVE% Drive and try again.
  64. goto EOF
  65.  
  66. :usage3
  67. cls
  68. echo This install must be run from the same DRIVE/DIRECTORY that the 
  69. echo Terror From the Deep Demo files are located in.  Please change to that
  70. echo DRIVE/DIRECTORY and run INSTALL again.
  71. goto EOF
  72.  
  73. :error1
  74. cls
  75. echo The install was unable to create the installation directory.
  76. echo This means that you do not have enough disk space or that you forgot
  77. echo to put a : on the drive letter to install to, or the installation
  78. echo directory already exists.  If the directory %DRIVE%\MPS\TFTD already exists
  79. echo on your hard drive then use the -O command to overwrite the existing
  80. echo directory.
  81. echo EXAMPLE:  INSTALL C: -O
  82. if "%2" == "-o" goto install
  83. if "%2" == "-O" goto install
  84. if "%2" == "o" goto install
  85. if "%2" == "O" goto install
  86. goto EOF
  87.  
  88. :error2
  89. cls
  90. echo An Error has occured while installing the software, you may have
  91. echo a bad copy.  Please try the install again, if it fails then get
  92. echo another copy of this update.
  93. goto EOF
  94.  
  95.  
  96. :nodrive
  97. cls
  98. @echo Please install from the DOS prompt instead!!
  99. @echo Change to the directory: \demos\xcom
  100. @echo and type INSTALL
  101. @echo
  102. @pause
  103. goto EOF
  104.  
  105. :end
  106. cls
  107.  
  108. echo Installation Complete!
  109.  
  110. %DRIVE%
  111.  
  112. cd \mps\tftd
  113.  
  114. echo type TFTD to run the demonstration 
  115.  
  116. tftd
  117.  
  118. :EOF
  119. set drive=
  120. pause
  121.