home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / VIRUS / TBSCAN33.ZIP / INSTALL.BAT next >
DOS Batch File  |  1992-03-10  |  4KB  |  99 lines

  1. @echo off
  2. echo off
  3.  
  4. if '%1'=='' goto help
  5. if not exist TbScan.Exe goto err1
  6.  
  7. echo                         INSTALLATION TBSCAN
  8. echo ───────────────────────────────────────────────────────────────────────
  9. echo            TbScan is no longer a COM file but an EXE file!
  10. echo          If there is a COM and a EXE file with the same name,
  11. echo                       DOS executes the COM file.
  12. echo          To make sure that TbScan.EXE file will be executed,
  13. echo                all TbScan.COM files have to be deleted!
  14. echo          This installation batch file deletes the TbScan.COM
  15. echo              file in the target directory automatically.
  16. echo      However, if there are other TbScan.COM files on your system,
  17. echo                   you should delete them manually.
  18.  
  19. rem  If a file with urgent information exists print it now
  20. if exist Readme.Now type Readme.Now
  21. echo ───────────────────────────────────────────────────────────────────────
  22.  
  23. rem  Make directory if it does not exist
  24. if not exist %1\nul md %1
  25. rem  Directory should now exist
  26. if not exist %1\nul goto err2
  27. rem  Delete TbScan.COM if it is there
  28. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  29. rem  Delete old TbScan.Pgm file if it is there
  30. if exist %1\TbScan.Pgm del %1\TbScan.Pgm >nul
  31. rem  Delete old AVR modules if they are there
  32. if exist %1\*.Avr del %1\*.Avr >nul
  33. rem  Copy the files to the target directory
  34. copy TbScan.Exe %1\TbScan.Exe >nul
  35. rem  The file should have been copied now
  36. if not exist %1\TbScan.Exe goto err3
  37. if exist *.avr copy *.avr %1\*.avr >nul
  38. if exist *.Doc copy *.Doc %1\*.Doc >nul
  39. if exist *.dat copy *.dat %1\*.dat >nul
  40. if exist TbScan.Hlp copy TbScan.Hlp %1\TbScan.Hlp >nul
  41. if exist TbScan.Msg copy TbScan.Msg %1\TbScan.Msg >nul
  42. if exist TbScan.Key copy TbScan.Key %1\TbScan.Key >nul
  43. if not exist Tbs.Bat goto label1
  44. rem  If there is already a Tbs.Bat in the target directory do not destroy it,
  45. rem  it might be customized by the user.
  46. if not exist %1\Tbs.Bat copy Tbs.Bat %1\Tbs.Bat >nul
  47. :label1
  48. rem  If we are installing the registered version delete the Register.Doc file
  49. if exist TbScan.Key del %1\Register.Doc >nul
  50. if not exist TbScan.New goto ready
  51. rem  If the target directory contains an old TbScan.NEW file update it
  52. if exist %1\TbScan.New copy TbScan.New %1\TbScan.New >nul
  53. :ready
  54. echo ───────────────────────────────────────────────────────────────────────
  55. echo TbScan is now installed. It is recommended to print or read the file
  56. echo TbScan.Doc. To run TbScan type "%1\TbScan C:\".
  57. echo Type "%1\TbScan -help" to get a help screen.
  58. if not exist scanx goto ready2
  59. echo Note: TbScanX is resident in this system. Since the TbScan.Dat file is
  60. echo updated it is recommended to reboot.
  61. :ready2
  62. if not exist InstallX.Bat goto end
  63. echo ───────────────────────────────────────────────────────────────────────
  64. echo ───────────────────────────────────────────────────────────────────────
  65. echo To install or update TbScanX too, you should run batch file "InstallX".
  66. goto end
  67.  
  68. :err1
  69. echo ───────────────────────────────────────────────────────────────────────
  70. echo Error: TbScan.Exe not found in current directory.
  71. echo        Change to the drive and directory containing this file.
  72. goto end
  73.  
  74. :err2
  75. echo ───────────────────────────────────────────────────────────────────────
  76. echo Error: Can not create directory %1\
  77. echo        Invalid path or write protected disk.
  78. echo        You should NOT specify a trailing backslash (\).
  79. goto end
  80.  
  81. :err3
  82. echo ───────────────────────────────────────────────────────────────────────
  83. echo Error: Can not copy TbScan.Exe to %1\TbScan.Exe
  84. echo        Disk probably full or write protected.
  85. goto end
  86.  
  87. :help
  88. echo ───────────────────────────────────────────────────────────────────────
  89. echo This installation batch file installs the TbScan virus detector.
  90. echo You have to specify the directory where TbScan has to be installed.
  91. echo If the directory does not exist it will be created.
  92. echo Do NOT specify a trailing backslash (\).
  93. echo Examples:
  94. echo                    install c:              (install in the root)
  95. echo                    install d:\tb           (install in directory D:\TB)
  96. :end
  97. echo ───────────────────────────────────────────────────────────────────────
  98.  
  99.