home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / UTILS / TBAV501.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1992-11-16  |  7KB  |  230 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBAV.EXE goto error1
  9.  
  10. rem     * Make sure that the user specified a destination path
  11. if %1X==X goto error2
  12.  
  13. rem     * Make sure the target path exists or can be created
  14. if exist %1\nul goto pathexists
  15. md %1
  16. if not exist %1\nul goto error3
  17. :pathexists
  18.  
  19. rem     * Make sure user did not type something like 'C:' :-)
  20. if exist %1\CONFIG.SYS goto error5
  21.  
  22. rem     * Copy the TBAV utilities if necessary
  23. if exist dummy.tst del dummy.tst >nul
  24. if exist %1\dummy.tst del %1\dummy.tst
  25. echo TEST >%1\dummy.tst
  26. if exist dummy.tst goto filesexist
  27. if not exist %1\dummy.tst goto error4
  28. echo Copying files. Please wait...
  29. copy *.* %1 >nul
  30. echo.
  31. :filesexist
  32. del %1\dummy.tst >nul
  33.  
  34. rem     * DOS has no interactive batch file commands,
  35. rem     * so we create a special program to solve that!
  36. rem     * the 'garbage' in the echo command is program code
  37. rem     * to read a key into an errorlevel, we copy the program code
  38. rem     * into something executable.
  39. echo ═êα╧┤L═! >%1\ask.com
  40.  
  41. echo.
  42. echo TbSetup will now generate or update the Anti-Vir.Dat file
  43. echo of the directory %1
  44. pause
  45. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  46. %1\TBSETUP %1
  47.  
  48. cls
  49. rem     * do not overwrite an existing TBAV setup.
  50. if exist %1\TBSTART.BAT goto ready
  51.  
  52. echo.
  53. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  54. echo directory. It is recommended to read the documentation of TBAV thoroughly
  55. echo and to make a customized setup. One of the advantages of the Thunderbyte
  56. echo Anti-Virus utilities is flexibility and the possibility to configure
  57. echo them to suit your needs in an optimal way.
  58. echo.
  59. echo This installation batch file helps you to setup the utilities in their
  60. echo most standard and non-customized way.
  61. echo Do you want to continue? (Y/n)
  62. %1\ask
  63. if not errorlevel 1 goto ready
  64.  
  65. rem     * make a backup of the AUTOEXEC.BAT file!
  66. echo.
  67. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  68. copy c:\autoexec.bat c:\autoexec.org >nul
  69.  
  70. rem     * create a TBSTART.BAT file in the TBAV directory.
  71. echo @echo off >%1\TBSTART.BAT
  72. echo echo off >>%1\TBSTART.BAT
  73.  
  74. echo.
  75. echo For easy access of the TBAV utilities it is recommended to put them
  76. echo into your PATH environment variable.
  77. echo Do you want to add %1 to your PATH statement? (Y/n)
  78. %1\ask
  79. if not errorlevel 1 goto dosetup
  80. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  81. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  82.  
  83. :dosetup
  84. echo.
  85. echo TbSetup will now process the C:\ drive to generate the Anti-Vir.Dat files.
  86. echo You may need to repeat this process for other drives.
  87. pause
  88. rem     * process the rest of the machine, but do not touch existing information!
  89. %1\TBSETUP newonly C:\
  90.  
  91. :tbdriver
  92. cls
  93. echo.
  94. echo The TBAV package contains some utilities that can be installed in the memory
  95. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  96. %1\ask
  97. if not errorlevel 1 goto autoscan
  98. rem     * create a TBSTART.BAT file in the TBAV directory.
  99. echo %1\tbdriver >>%1\TBSTART.BAT
  100.  
  101. if not exist %1\VIRSCAN.DAT goto tbcheck
  102. echo.
  103. echo TBSCANX is a memory resident virus scanner.
  104. echo Do you want to install it? (Y/n)
  105. %1\ask
  106. if not errorlevel 1 goto tbcheck
  107. rem     * add the TbScanX statement to the TBSTART.BAT file.
  108. echo %1\tbscanx >>%1\TBSTART.BAT
  109.  
  110. :tbcheck
  111. echo.
  112. echo TBCHECK is a memory resident integrity checker.
  113. echo Do you want to install it? (Y/n)
  114. %1\ask
  115. if not errorlevel 1 goto tbmem
  116. rem     * add the TbCheck statement to the TBSTART.BAT file.
  117. echo %1\tbcheck >>%1\TBSTART.BAT
  118.  
  119. :tbmem
  120. echo.
  121. echo TBMEM is a resident memory guard.
  122. echo Do you want to install it? (Y/n)
  123. %1\ask
  124. if not errorlevel 1 goto tbfile
  125. rem     * add the TbMem statement to the TBSTART.BAT file.
  126. echo %1\tbmem >>%1\TBSTART.BAT
  127.  
  128. :tbfile
  129. echo.
  130. echo TBFILE is a resident file guard.
  131. echo Do you want to install it? (Y/n)
  132. %1\ask
  133. if not errorlevel 1 goto autoscan
  134. rem     * add the TbFile statement to the TBSTART.BAT file.
  135. echo %1\tbfile >>%1\TBSTART.BAT
  136.  
  137. :autoscan
  138. if not exist %1\VIRSCAN.DAT goto addcall
  139. echo.
  140. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  141. %1\ask
  142. if not errorlevel 1 goto addcall
  143. rem     * add the TbScan statement to the TBSTART.BAT file.
  144. echo %1\tbscan once C:\ >>%1\TBSTART.BAT
  145.  
  146. :addcall
  147. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  148. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  149. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  150. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  151. del C:\TEMP.BAT >nul
  152. del C:\TEMP2.BAT >nul
  153.  
  154. :ready
  155. if not exist %1\VIRSCAN.DAT goto novirscan
  156. echo.
  157. echo Do you want to scan the C:\ disk now? (Y/n)
  158. %1\ask
  159. if not errorlevel 1 goto starttbav
  160. %1\tbscan C:\
  161. goto starttbav
  162.  
  163. :novirscan
  164. echo.
  165. echo VIRSCAN.DAT has not been found on your system. This file is required if
  166. echo you want to use TbScan or TbScanX. You can obtain a recent VIRSCAN.DAT
  167. echo on most Thunderbyte support Bulletin Board Systems.
  168.  
  169. :starttbav
  170. echo.
  171. echo TbSetup has been used to setup disk C:\. If your system has additional
  172. echo disk partitions, you have to use TBSETUP on your other disks as well.
  173. echo Consult the documentation for more information!
  174. echo.
  175. echo The menu program TBAV.EXE can be used to read the documentation files.
  176. echo Do you want to start TBAV now? (Y/n)
  177. %1\ask
  178. if not errorlevel 1 goto end
  179. %1\TBAV
  180. goto end
  181.  
  182. :error1
  183. echo Error: Invalid program invocation!
  184. echo.
  185. echo Make sure that you invoke INSTALL.BAT in the directory where the
  186. echo TBAV utilities can be found!
  187. echo.
  188. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  189. echo A: <enter>
  190. echo INSTALL <path> <enter>
  191. goto end
  192.  
  193. :error2
  194. echo Error: No destination path specified!
  195. echo.
  196. echo You have to specify the destination path for the TBAV utilities!
  197. echo Even if the utilities are already in the destination path.
  198. echo.
  199. echo Example:
  200. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  201. echo INSTALL C:\TBAV
  202. goto end
  203.  
  204. :error3
  205. echo Error: Unable to creat destination directory %1
  206. echo.
  207. echo Make sure you enter an existing destination path or a path that can be created!
  208. goto end
  209.  
  210. :error4
  211. echo Error: Unable to copy files in directory %1
  212. echo.
  213. echo Disk full? Access denied?
  214. goto end
  215.  
  216. :error5
  217. echo Error: No target directory specified!
  218. echo.
  219. echo Make sure you enter a full destination path!
  220. echo %1 is not sufficient!
  221. echo.
  222. echo Example:
  223. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  224. echo INSTALL C:\TBAV
  225. goto end
  226.  
  227. :end
  228. if exist %1\ask.com del %1\ask.com >nul
  229.  
  230.