home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / VIRUS / TBSCNX31.ZIP / INSTALLX.BAT next >
Encoding:
DOS Batch File  |  1992-04-23  |  4.3 KB  |  104 lines

  1. @echo off
  2. echo off
  3.  
  4. if '%1'=='' goto help
  5. if not exist TbScanX.Exe goto err1
  6.  
  7. echo                         INSTALLATION TBSCANX
  8. echo ───────────────────────────────────────────────────────────────────────
  9. echo            TbScanX 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 TbScanX.EXE file will be executed,
  13. echo                all TbScanX.COM files have to be deleted!
  14. echo          This installation batch file deletes the TbScanX.COM
  15. echo              file in the target directory automatically.
  16. echo      However, if there are other TbScanX.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 TbScanX.COM if it is there
  28. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  29. if exist %1\TbScanX.286 del %1\TbScanX.286 >nul
  30. if exist %1\TbScanX.386 del %1\TbScanX.386 >nul
  31. rem  Copy the files to the target directory
  32. copy TbScanX.Exe %1\TbScanX.Exe >nul
  33. rem  The file should have been copied now
  34. if not exist %1\TbScanX.Exe goto err3
  35. if exist TbScanX?.Exe copy TbScanX?.Exe %1\TbScanX?.Exe >nul
  36. if exist *.Doc copy *.Doc %1\*.Doc >nul
  37. if exist *.dat copy *.dat %1\*.dat >nul
  38. if exist TbScan.Key copy TbScan.Key %1\TbScan.Key >nul
  39. rem  If we are installing the registered version delete the Register.Doc file
  40. if exist TbScan.Key del %1\Register.Doc >nul
  41. if not exist TbScanX.New goto ready
  42. rem  If the target directory contains an old TbScanX.NEW file update it
  43. if exist %1\TbScanX.New copy TbScanX.New %1\TbScanX.New >nul
  44. :ready
  45. echo ───────────────────────────────────────────────────────────────────────
  46. echo TbScanX has been copied to %1.
  47. echo It is recommended to print or read the file TbScanX.Doc.
  48. echo To run TbScanX type "%1\TbScanX".
  49. echo Type "%1\TbScanX -help" to get a help screen.
  50. echo It is recommended to install TbScanX in the Autoexec.Bat or Config.Sys
  51. echo file to start it automatically after a system reboot.
  52. echo This installation batch file can do this automatically for you.
  53. echo If you do NOT want this press Ctrl-C now, otherwise
  54. pause
  55. echo Testing for the presence of Autoexec.Bat...
  56. if not exist c:\autoexec.bat goto err4
  57. echo Adding TbScanX startup invokation line...
  58. echo %1\TbScanX >>C:\Autoexec.Bat
  59. echo TbScanX is now installed in the Autoexec.Bat file.
  60. echo You may want to edit this file to fine tune TbScanX.
  61. echo Consult the manual for more information.
  62. goto end
  63.  
  64. :err1
  65. echo ───────────────────────────────────────────────────────────────────────
  66. echo Error: TbScanX.Exe not found in current directory.
  67. echo        Change to the drive and directory containing this file.
  68. goto end
  69.  
  70. :err2
  71. echo ───────────────────────────────────────────────────────────────────────
  72. echo Error: Can not create directory %1\
  73. echo        Invalid path or write protected disk.
  74. echo        You should NOT specify a trailing backslash (\).
  75. goto end
  76.  
  77. :err3
  78. echo ───────────────────────────────────────────────────────────────────────
  79. echo Error: Can not copy TbScanX.Exe to %1\TbScanX.Exe
  80. echo        Disk probably full or write protected.
  81. goto end
  82.  
  83. :err4
  84. echo ───────────────────────────────────────────────────────────────────────
  85. echo Error: Can not access C:\Autoexec.Bat file
  86. echo        To install TbScanX manually add the following line to
  87. echo        the Autoexec.Bat file:
  88. echo        "%1\TbScanX"
  89. goto end
  90.  
  91. :help
  92. echo ───────────────────────────────────────────────────────────────────────
  93. echo This installation batch file installs the TbScanX virus detector.
  94. echo You have to specify the directory where TbScanX has to be installed.
  95. echo If the directory does not exist it will be created.
  96. echo Do NOT specify a trailing backslash (\).
  97. echo Examples:
  98. echo                    installx c:             (install in the root)
  99. echo                    installx d:\tb          (install in directory D:\TB)
  100. :end
  101. echo ───────────────────────────────────────────────────────────────────────
  102.  
  103.  
  104.