home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / UT / UT157.ZIP / XINSTALL.BAT < prev    next >
DOS Batch File  |  1991-07-24  |  6KB  |  108 lines

  1. @echo off
  2. rem  xinstall.bat  -  Install "DOS Extensions for Professionals" executables.
  3. rem  
  4. rem  Copyright 1991 John B. Allison
  5. rem
  6. cls
  7. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  8. echo ║ XINSTALL installs executable files for "DOS Extensions for Professionals"   ║
  9. echo ║ on your system.                                                             ║
  10. echo ║                                                                             ║
  11. echo ║ XINSTALL must be run from the distribution disk.                            ║
  12. echo ║                                                                             ║
  13. echo ║ XINSTALL must be run with the Drive and Directory to which you want the     ║
  14. echo ║ executables copied as the first argument.                                   ║
  15. echo ║                                                                             ║
  16. echo ║ For example:                                                                ║
  17. echo ║                                                                             ║
  18. echo ║                "A:> XINSTALL  C:\UTIL"                                      ║
  19. echo ║                                                                             ║
  20. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  21. pause
  22. cls
  23. if not %1x == x goto nexttest
  24. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  25. echo ║ XINSTALL must be run with the Drive and Directory to which you want the     ║
  26. echo ║ executables copied as the first argument.                                   ║
  27. echo ║                                                                             ║
  28. echo ║ For example:                                                                ║
  29. echo ║                                                                             ║
  30. echo ║                "A:> XINSTALL  C:\UTIL"                                      ║
  31. echo ║                                                                             ║
  32. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  33. goto exit
  34. :nexttest
  35. if exist diff.exe goto lookup
  36. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  37. echo ║ Cannot find expected files.                                                 ║
  38. echo ║                                                                             ║
  39. echo ║ XINSTALL must be run from the distribution disk.                            ║
  40. echo ║                                                                             ║
  41. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  42. goto exit
  43. :lookup
  44. rem
  45. rem  Apparently a simple check for existence of a directory does not work.
  46. rem  Try to copy a file to the new directory.
  47. rem
  48. copy diff.exe %1\diff.exe  >nul
  49. if exist %1\diff.exe goto okay >nul
  50. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  51. echo ║  Unable to locate directory %1                                       ║
  52. echo ║                                                                             ║
  53. echo ║  This batch file will attempt to create the directory %1           ║
  54. echo ║  unless you "<CTRL> C" and Terminate=Y now.                                 ║
  55. echo ║                                                                             ║
  56. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  57. pause
  58. cls
  59. rem
  60. rem  Try to make the directory
  61. rem
  62. mkdir %1  >nul
  63. copy diff.exe %1\diff.exe  >nul
  64. if exist %1\diff.exe goto okay  >nul
  65. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  66. echo ║  Unable to create directory %1                                     ║
  67. echo ║                                                                             ║
  68. echo ║  Create the directory manually and re-execute XINSTALL.BAT to install       ║
  69. echo ║  "DOS Extensions for Professionals".                                        ║
  70. echo ║                                                                             ║
  71. echo ║  Be sure you are executing this batch file from the distribution disk.      ║
  72. echo ║                                                                             ║
  73. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  74. goto exit
  75. :okay
  76. rem
  77. rem  Copy rest of executables.
  78. rem
  79. copy dump.exe     %1  >nul
  80. if not exist %1\dump.exe echo DUMP.EXE not copied.
  81. copy search.exe   %1  >nul
  82. if not exist %1\search.exe echo SEARCH.EXE not copied.
  83. copy split.exe    %1  >nul
  84. if not exist %1\split.exe echo SPLIT.EXE not copied.
  85. copy sub.exe      %1  >nul
  86. if not exist %1\sub.exe echo SUB.EXE not copied.
  87. copy xdel.exe     %1  >nul
  88. if not exist %1\XDEL.exe echo XDEL.EXE not copied.
  89. copy xdir.exe     %1  >nul
  90. if not exist %1\XDIR.exe echo XDIR.EXE not copied.
  91. copy xhelp.exe    %1  >nul
  92. if not exist %1\xhelp.exe echo XHELP.EXE not copied.
  93. rem
  94. rem  Prepend path
  95. rem
  96. path=%1;%path%
  97. echo ╔═════════════════════════════════════════════════════════════════════════════╗
  98. echo ║  All executables copied except as noted above.                              ║
  99. echo ║                                                                             ║
  100. echo ║  Your path has been temporarily reset to include %1.
  101. echo ║                                                                             ║
  102. echo ║  You MUST include a PATH= statement in your AUTOEXEC.BAT file having the    ║
  103. echo ║  path %1 as a component if these utilities are to be universally
  104. echo ║  available after reboot.                                                    ║
  105. echo ║                                                                             ║
  106. echo ╚═════════════════════════════════════════════════════════════════════════════╝
  107. :exit
  108.