home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / mahjonng / tgmahj12.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-07-12  |  3KB  |  97 lines

  1. REM -----------------------------------------------------
  2. REM Run this batch file to install TEGL. SEE USAGE AT END
  3. REM -----------------------------------------------------
  4. @echo off
  5. cls
  6. set tginpath=\tegl
  7. REM -- CHECK THE COMMAND LINE PARAMETERS
  8. IF "%1p" == "p" GOTO USAGE
  9. IF "%2p" == "p" GOTO USAGE
  10. set tginsrc=%1
  11. set tgindrv=%2
  12. IF %tgindrv% == %tginsrc% GOTO FATAL1
  13. IF "%2" == "a:" GOTO FATAL2
  14. IF "%2" == "b:" GOTO FATAL2
  15. IF "%2" == "A:" GOTO FATAL2
  16. IF "%2" == "B:" GOTO FATAL2
  17. IF "%2" == "c" GOTO FATAL4
  18. IF "%2" == "C" GOTO FATAL4
  19. IF "%2" == "d" GOTO FATAL4
  20. IF "%2" == "D" GOTO FATAL4
  21. IF "%2" == "e" GOTO FATAL4
  22. IF "%2" == "E" GOTO FATAL4
  23. IF "%2" == "f" GOTO FATAL4
  24. IF "%2" == "F" GOTO FATAL4
  25. IF "%1" == "a" GOTO FATAL4
  26. IF "%1" == "b" GOTO FATAL4
  27. IF "%1" == "A" GOTO FATAL4
  28. IF "%1" == "B" GOTO FATAL4
  29. IF NOT EXIST %1\install.bat GOTO USAGE
  30.  
  31. type what.txt
  32. pause
  33. cls
  34. echo ┌───────────────────────────────────────────────────┐
  35. echo │ INSTALL PATHS:                                    │
  36. echo ├───────────────────────────────────────────────────┘
  37. echo │ Source drive is %1
  38. echo │ Target drive is %2
  39. echo │ Target directory is %2%tginpath%
  40. echo ├───────────────────────────────────────────────────┐
  41. echo │If you are ready to continue with installation     │
  42. echo │press a key otherwise press Ctrl-Break to cancel   │
  43. echo └───────────────────────────────────────────────────┘
  44. pause
  45. REM ─────────────────────────────────────────────────────
  46. REM INSTALLATION BEGINS HERE. Change to target drive
  47. REM then create the directory.
  48. echo installing . . .
  49. %tgindrv%
  50. cd \
  51. md %tginpath%
  52. IF NOT EXIST %tgindrv%%tginpath%\PRN GOTO FATAL3
  53. cd %tginpath%
  54. copy %tginsrc%\*.*
  55. cls
  56. echo ┌────────────────────────────────────────────────────────┐
  57. echo │ Installation is complete!                              │
  58. echo ├────────────────────────────────────────────────────────┤
  59. echo │ Information files will now be displayed. Press the     │
  60. echo │ Escape Key after reading each file. To run the games   │
  61. echo │ type help or go.                                       │
  62. echo └────────────────────────────────────────────────────────┘
  63. pause
  64. readme
  65. :FATAL1
  66. echo ┌────────────────────────────────────────────┐
  67. echo │ Source and destination are the same!!!     │
  68. echo │ INSTALL CANNOT CONTINUE.                   │
  69. echo └────────────────────────────────────────────┘
  70. GOTO END
  71. :FATAL2
  72. echo ┌───────────────────────────────────────────┐
  73. echo │Cannot install to Drive A: or B:           │
  74. echo └───────────────────────────────────────────┘
  75. GOTO END
  76. :FATAL3
  77. echo ------------------------------------------
  78. %tginsrc%
  79. echo ┌──────────────────────────────────────────┐
  80. echo │ Could not create target directory.       │
  81. echo └──────────────────────────────────────────┘
  82. GOTO END
  83. :FATAL4
  84. echo ┌──────────────────────────────────────────────┐
  85. echo │  Invalid drive specifier. Include colon.     │
  86. echo └──────────────────────────────────────────────┘
  87. GOTO END
  88. :USAGE
  89. echo ┌────────────────────────────────────────────────┐
  90. echo │ You must specify the SOURCE drive and the      │
  91. echo │ DESTINATION drive as arguments to install as   │
  92. echo │ the first two arguments include the colons.    │
  93. echo │ EXAMPLE: install a: c:                         │
  94. echo └────────────────────────────────────────────────┘
  95. :END
  96.  
  97.