home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PERSONAL / GMTHOR2.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-03-13  |  4KB  |  129 lines

  1. echo off
  2. cls
  3. break on
  4. if %0==a:install goto adrive
  5. if %0==A:install goto adrive
  6. if %0==A:INSTALL goto adrive
  7. if %0==b:install goto bdrive
  8. if %0==B:install goto bdrive
  9. if %0==B:INSTALL goto bdrive
  10. if %0==install goto doinstall
  11. if %0==INSTALL goto doinstall
  12. echo Please switch to the drive you wish to install from before
  13. echo starting install.  For example, to install from the B: drive,
  14. echo Enter         B:
  15. echo Then enter    INSTALL %1
  16. goto End
  17.  
  18. :adrive
  19. goto doinstall
  20.  
  21. :bdrive
  22. b:
  23. goto doinstall
  24.  
  25. :doinstall
  26.  
  27. if "%1"=="" goto DriveNeeded
  28. if %1==a: goto MakeDir
  29. if %1==A: goto MakeDir
  30. if %1==b: goto MakeDir
  31. if %1==B: goto MakeDir
  32. if %1==c: goto MakeDir
  33. if %1==C: goto MakeDir
  34. if %1==d: goto MakeDir
  35. if %1==D: goto MakeDir
  36. if %1==e: goto MakeDir
  37. if %1==E: goto MakeDir
  38. if %1==f: goto MakeDir
  39. if %1==F: goto MakeDir
  40. if %1==g: goto MakeDir
  41. if %1==G: goto MakeDir
  42. if %1==h: goto MakeDir
  43. if %1==i: goto MakeDir
  44. if %1==I: goto MakeDir
  45. if %1==j: goto MakeDir
  46. if %1==J: goto MakeDir
  47. if %1==k: goto MakeDir
  48. if %1==K: goto MakeDir
  49. if %1==l: goto MakeDir
  50. if %1==L: goto MakeDir
  51. if %1==m: goto MakeDir
  52. if %1==M: goto MakeDir
  53. if %1==n: goto MakeDir
  54. if %1==N: goto MakeDir
  55. if %1==o: goto MakeDir
  56. if %1==O: goto MakeDir
  57. if %1==p: goto MakeDir
  58. if %1==P: goto MakeDir
  59.  
  60. :InvalidDrive
  61. echo "%1" is an invalid drive name.  Please use the correct drive letter
  62. echo followed by a colon:
  63.  
  64. :DriveNeeded
  65. echo Please specify which drive to install DOSAGE MASTER v2 to,
  66. echo for example:
  67. :Example
  68. echo.
  69. echo         install c:
  70. goto End
  71.  
  72. :MakeDir
  73. echo ╔═══════════════════════════════════════════════════════════════╗
  74. echo ║                                                               ║
  75. echo ║                        GAMBLER'S MATE                         ║
  76. echo ║                       DOSAGE MASTER v2                        ║
  77. echo ║                     Disk Install Utility                      ║
  78. echo ║                                                               ║
  79. echo ║                                                               ║
  80. echo ║  This program will install all files into a directory called  ║
  81. echo ║  "\GM\DM2" on drive %1.  If you do not wish to do this, then  ║
  82. echo ║  press Ctrl-C then "Y" now.                                   ║
  83. echo ║                                                               ║
  84. echo ╚═══════════════════════════════════════════════════════════════╝
  85. echo.
  86. pause
  87. echo.
  88.  
  89. if exist %1\GM\DM2\*.* goto DirExists
  90. md %1\GM > nul
  91. md %1\GM\DM2
  92. goto CopyFiles
  93.  
  94. :DirExists
  95. echo WARNING:  The directory %1\GM\DM2 already exists.  Press Ctrl-C then
  96. echo           "Y" now if you don't want to overwrite the contents of that
  97. echo           directory.
  98. echo.
  99. pause
  100. echo.
  101.  
  102. :CopyFiles
  103. echo Copying "DOSAGE MASTER v2" files to %1\GM\DM2...
  104. copy/v *.* %1\GM\DM2 > NUL
  105.  
  106. if not exist %1\GM\DM2\dm2-add.exe goto InstallError
  107.  
  108. cls
  109. echo ╔══════════════════════════════════════════════════════════════════════╗
  110. echo ║                                                                      ║
  111. echo ║  DOSAGE MASTER v2 has been successfully installed to your %1 drive.  ║
  112. echo ║                                                                      ║
  113. echo ║        To run DOSAGE MASTER v2 type  DM2  and press ENTER.           ║
  114. echo ║                                                                      ║
  115. echo ╚══════════════════════════════════════════════════════════════════════╝
  116. %1
  117. cd %1\GM\DM2
  118.  
  119. goto End
  120.  
  121. :InstallError
  122. echo ERROR:  Installation of DOSAGE MASTER v2 into %1\GM\DM2 was unsuccessful.
  123. echo         This could be caused because your %1 drive is full or unaccessible.
  124. echo         DOSAGE MASTER v2 needs about 201K of free disk space.
  125. echo.
  126.  
  127. :End
  128. echo.
  129.