home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / fox / phonbase / install.bat < prev    next >
DOS Batch File  |  1991-10-20  |  4KB  |  110 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo.  
  5. echo ┌────────────────────────────────────────────────────────────────────────┐
  6. echo │                    PhDbase 2.0 Installation                            │
  7. echo └────────────────────────────────────────────────────────────────────────┘
  8. echo   This program will install PhDbase 2.0 into your FoxPro directory.  
  9. echo   It will place the files PHDBASE.APP, PHDBASE.SET, PHDBASE.HLP, 
  10. echo   PHDBASE.FPT, and PHSAMPLE.DBF directly into your FoxPro directory.  
  11. echo   It will also create a subdirectory within your FoxPro directory 
  12. echo   called PHDBASE (i.e. C:\FOXPRO2\PHDBASE\) which will contain
  13. echo   PhDbase's auxiliary documentation files (such as README.DOC).
  14. echo.  
  15. echo   If you are installing PhDbase from a floppy disk, you *MUST* be
  16. echo   within your FoxPro directory.  Alternatively, you may specify the
  17. echo   FoxPro directory on the install command line (see below).
  18. echo.  
  19. echo   If you are installing a version of PhDbase that was compressed for
  20. echo   electronic distribution, you should uncompress all the files into a
  21. echo   temporary directory, make that the current directory, and then run
  22. echo   install, specifying the FoxPro directory WITH THE TRAILING BACKSLASH
  23. echo   on the install command line (for example, "A:INSTALL C:\FOXPRO2\").
  24. echo   Then you can delete the files from the temporary directory.  
  25. echo.  
  26. echo   Press Ctrl-C now to abort the installation process, or press any
  27. echo   other key to continue...
  28. pause >nul
  29. cls
  30. echo.  
  31. echo ┌────────────────────────────────────────────────────────────────────────┐
  32. echo │               Checking for presence of FOXPRO*.EXE...                  │
  33. echo └────────────────────────────────────────────────────────────────────────┘
  34. if exist %1foxpro*.exe goto okay
  35. if not .%1 == . goto specified
  36. echo   Can't find FOXPRO*.EXE in the current directory!
  37. echo.  
  38. echo   Please change directories to your FoxPro directory and then run
  39. echo   install again.
  40. goto exit
  41. :specified
  42. echo   Can't find FOXPRO*.EXE in %1!
  43. echo.  
  44. echo   Make sure your path specification includes the trailing backslash
  45. echo   and then run install again.  Or change directories to your FoxPro
  46. echo   directory, and then run install again with no parameters.
  47. goto exit
  48. :okay
  49. echo   Found FOXPRO*.EXE...
  50. rem
  51. rem Set install drive to A:, B:, C:, or D:.
  52. rem
  53. if %0 == a:install goto adrive
  54. if %0 == A:INSTALL goto adrive
  55. if %0 == b:install goto bdrive
  56. if %0 == B:INSTALL goto bdrive
  57. if %0 == c:install goto cdrive
  58. if %0 == C:INSTALL goto cdrive
  59. if %0 == d:install goto ddrive
  60. if %0 == D:INSTALL goto ddrive
  61. goto skipdrive
  62. :adrive
  63. set %_drive=a:
  64. goto skipdrive
  65. :bdrive
  66. set %_drive=b:
  67. goto skipdrive
  68. :cdrive
  69. set %_drive=c:
  70. goto skipdrive
  71. :ddrive
  72. set %_drive=d:
  73. :skipdrive
  74. echo.  
  75. echo ┌────────────────────────────────────────────────────────────────────────┐
  76. echo │               Copying files to FoxPro directory...                     │
  77. echo └────────────────────────────────────────────────────────────────────────┘
  78. echo   Copying PHDBASE.APP...
  79. copy %_drive%phdbase.app %1 >nul
  80. echo   Copying PHDBASE.SET...
  81. copy %_drive%phdbase.set %1 >nul
  82. echo   Copying PHDBASE.HLP...
  83. copy %_drive%phdbase.hlp %1 >nul
  84. echo   Copying PHDBASE.FPT...
  85. copy %_drive%phdbase.fpt %1 >nul
  86. echo   Copying PHSAMPLE.DBF...
  87. copy %_drive%phsample.dbf %1 >nul
  88. echo.  
  89. echo ┌────────────────────────────────────────────────────────────────────────┐
  90. echo │               Copying files to PhDbase subdirectory...                 │
  91. echo └────────────────────────────────────────────────────────────────────────┘
  92. echo   Creating PhDbase subdirectory...
  93. if not exist %1phdbase\*.* md %1phdbase
  94. echo   Copying auxiliary files...
  95. copy %_drive%*.* %1phdbase >nul
  96. rem
  97. rem Remove redundant files.
  98. rem
  99. if exist %1phdbase\phdbase.app del %1phdbase\phdbase.app >nul
  100. if exist %1phdbase\phdbase.set del %1phdbase\phdbase.set >nul
  101. if exist %1phdbase\phdbase.hlp del %1phdbase\phdbase.hlp >nul
  102. if exist %1phdbase\phdbase.fpt del %1phdbase\phdbase.fpt >nul
  103. if exist %1phdbase\phsample.dbf del %1phdbase\phsample.dbf >nul
  104. rem
  105. set %_drive=
  106. rem
  107. echo.  
  108. echo   Installation done!
  109. :exit
  110.