home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / compceph.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-05-07  |  6KB  |  161 lines

  1. @echo off
  2. cls
  3.  
  4. set dst_path=\compceph
  5.  
  6. rem     command-line parameter testing
  7.  
  8. rem     did the user enter two drive letters?
  9. rem             if so we will use them, else we must abort
  10. if "%1p" == "p" goto USAGE
  11. if "%2p" == "p" goto USAGE
  12. set src_drv=%1
  13. set dst_drv=%2
  14.  
  15. rem     if the two drive letters are the same, we must abort
  16. if %dst_drv% == %src_drv% goto ERROR_1
  17.  
  18. rem     if the user is trying to install to a floppy drive, we must abort
  19. if "%2" == "a:" goto ERROR_2
  20. if "%2" == "b:" goto ERROR_2
  21. if "%2" == "A:" goto ERROR_2
  22. if "%2" == "B:" goto ERROR_2
  23.  
  24. rem     if a drive letter is missing a colon, we must abort
  25. if "%1" == "a" goto ERROR_4
  26. if "%1" == "b" goto ERROR_4
  27. if "%1" == "A" goto ERROR_4
  28. if "%1" == "B" goto ERROR_4
  29. if "%2" == "c" goto ERROR_4
  30. if "%2" == "C" goto ERROR_4
  31. if "%2" == "d" goto ERROR_4
  32. if "%2" == "D" goto ERROR_4
  33. if "%2" == "e" goto ERROR_4
  34. if "%2" == "E" goto ERROR_4
  35. if "%2" == "f" goto ERROR_4
  36. if "%2" == "F" goto ERROR_4
  37.  
  38. rem     if the source drive letter is wrong, we must abort
  39. if not exist %1\install.bat goto USAGE
  40.  
  41. rem     display credits
  42. echo    ╔════════════════════════════════════════════════════════════════════════╗
  43. echo    ║                                                                        ║
  44. echo    ║    Compu-Ceph (tm) version 1.2 and demonstration                       ║
  45. echo    ║                                                                        ║
  46. echo    ║    Copyright 1987-1994 ALGORITHM, Inc. and Christopher D. Watkins      ║
  47. echo    ║                                                                        ║
  48. echo    ║    ALL RIGHTS RESERVED                                                 ║
  49. echo    ║                                                                        ║
  50. echo    ║    Cephalometric Analysis Program with Image Processing                ║
  51. echo    ║                                                                        ║
  52. echo    ║    Marketed by Dualtek, Inc.                                           ║
  53. echo    ║                                                                        ║
  54. echo    ╚════════════════════════════════════════════════════════════════════════╝
  55. pause
  56.  
  57. cls
  58.     echo ┌──────────────────────────────────────────────────────┐
  59.     echo │ INSTALLATION PATHS:                                  │
  60.     echo ├──────────────────────────────────────────────────────┘
  61.     echo │          Source drive is %1
  62.     echo │     Destination drive is %2
  63.     echo │ Destination directory is %2%dst_path%
  64.     echo ├──────────────────────────────────────────────────────┐
  65.     echo │ Press any key, if you are ready to continue with the │
  66.     echo │ installation, otherwise press Ctrl-Break to cancel   │
  67.     echo └──────────────────────────────────────────────────────┘
  68. pause
  69.  
  70.     echo ┌───────────────┐
  71.     echo │ Installing... │
  72.     echo └───────────────┘
  73. %dst_drv%
  74. cd \
  75.  
  76. rem     make the destination directory, and if there is a problem, we must abort
  77. md %dst_path%
  78. if not exist %dst_drv%%dst_path%\prn goto ERROR_3
  79.  
  80. rem     if we could make the main directory, we assume that we can make the remainder
  81. md %dst_path%\7114
  82.  
  83. rem     if install exists where we think it does, we can continue, else we must abort.
  84. if not exist %src_drv%\install.bat goto ERROR_5
  85.  
  86. rem     copy over all of the files into their directories
  87. cd %dst_path%
  88. copy %src_drv%\lha.exe %dst_path%
  89. copy %src_drv%\lharc.lzh %dst_path%
  90. copy %src_drv%\compceph.lzh %dst_path%
  91. copy %src_drv%\7114.lzh %dst_path%\7114
  92.  
  93. cls
  94. rem     expanding compressed files.
  95. cd %dst_path%
  96. %dst_path%\lha x compceph
  97. cd %dst_path%\7114
  98. %dst_path%\lha x 7114
  99.  
  100. cd %dst_path%
  101.     echo ┌─────────────────────────────────────────────────┐
  102.     echo │ Installation complete.  Running Demonstration.  │
  103.     echo └─────────────────────────────────────────────────┘
  104.  
  105. win compceph
  106.  
  107. goto END
  108.  
  109.  
  110. :ERROR_1
  111.     echo ┌─────────────────────────────────────────────┐
  112.     echo │ Source and Destination drives are the same. │
  113.     echo └─────────────────────────────────────────────┘
  114. goto END
  115.  
  116.  
  117. :ERROR_2
  118.     echo ┌───────────────────────────────────┐
  119.     echo │ Cannot install to drives a: or b: │
  120.     echo └───────────────────────────────────┘
  121. goto END
  122.  
  123.  
  124. :ERROR_3
  125. %src_drv%
  126.     echo ┌─────────────────────────────────────────────┐
  127.     echo │ Could not create the destination directory. │
  128.     echo └─────────────────────────────────────────────┘
  129. goto END
  130.  
  131.  
  132. :ERROR_4
  133.     echo ┌─────────────────────────────────────────────────────────┐
  134.     echo │ Invalid drive specifier.  Be sure to include the colon. │
  135.     echo └─────────────────────────────────────────────────────────┘
  136. goto END
  137.  
  138.  
  139. :ERROR_5
  140.     echo ┌────────────────────────────────────────────┐
  141.     echo │ There seems to be an error with the        │
  142.     echo │ installation Source drive.  Please correct │
  143.     echo │ the problem and then run install again     │
  144.     echo └────────────────────────────────────────────┘
  145. goto END
  146.  
  147.  
  148. :USAGE
  149.     echo ┌────────────────────────────────────────────────────────────────┐
  150.     echo │           Batch file for installation of Compu-Ceph            │
  151.     echo ├────────────────────────────────────────────────────────────────┤
  152.     echo │       USAGE:   install source_drive destination_drive          │
  153.     echo │       EXAMPLE: install a: c:                                   │
  154.     echo ├────────────────────────────────────────────────────────────────┤
  155.     echo │ Copyright 1987-1994 Algorithm, Inc. and Christopher D. Watkins │
  156.     echo └────────────────────────────────────────────────────────────────┘
  157. goto END
  158.  
  159.  
  160. :END
  161.