home *** CD-ROM | disk | FTP | other *** search
/ The Disc (Australian) 2 / TheDiscIssue2.iso / share / fuzzy / install.bat < prev   
Encoding:
DOS Batch File  |  1995-07-05  |  2.5 KB  |  118 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 fuzzy100.zip goto usage3
  37.  
  38. REM Creating Install Directory
  39. md %DRIVE%\games
  40. md %DRIVE%\games\fuzzy
  41. if not exist %DRIVE%\games\fuzzy\nul goto error1
  42.  
  43. REM Installing UPDATE Software
  44. :install
  45. ..\..\demos\xcom\pkunzip -o -d fuzzy100 %DRIVE%\games\fuzzy
  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 Fuzzy's World of Golf to.
  55. echo EXAMPLE:  INSTALL C:
  56. goto EOF
  57.  
  58. :usage2
  59. cls
  60. echo Fuzzy's World of Minature Space Golf 4 Megabytes of Hard drive
  61. echo space to install. Drive %DRIVE% doesn't have enough space.
  62. echo Please free up some space on the %DRIVE% Drive and try again.
  63. goto EOF
  64.  
  65. :usage3
  66. cls
  67. echo This install must be run from the same DRIVE/DIRECTORY that the 
  68. echo Fuzzy's Space Golf files are located in.  Please change to that
  69. echo DRIVE/DIRECTORY and run INSTALL again.
  70. goto EOF
  71.  
  72. :error1
  73. cls
  74. echo The install was unable to create the installation directory.
  75. echo This means that you do not have enough disk space or that you forgot
  76. echo to put a : on the drive letter to install to, or the installation
  77. echo directory already exists.  If the directory %DRIVE%\GAMES\FUZZY already exists
  78. echo on your hard drive then use the -O command to overwrite the existing
  79. echo directory.
  80. echo EXAMPLE:  INSTALL C: -O
  81. if "%2" == "-o" goto install
  82. if "%2" == "-O" goto install
  83. if "%2" == "o" goto install
  84. if "%2" == "O" goto install
  85. goto EOF
  86.  
  87. :error2
  88. cls
  89. echo An Error has occured while installing the software, you may have
  90. echo a bad copy.  Please try the install again, if it fails then get
  91. echo another copy of this update.
  92. goto EOF
  93.  
  94.  
  95. :nodrive
  96. cls
  97. echo Man! Where did you run this from???????????
  98. goto EOF
  99.  
  100. :end
  101. cls
  102.  
  103. echo Installation Complete!
  104.  
  105.  
  106. %DRIVE%
  107.  
  108. cd \games\fuzzy
  109.  
  110.  
  111. echo type FUZZY to run the demonstration 
  112.  
  113. FUZZY
  114.  
  115. :EOF
  116. set drive=
  117. pause
  118.