home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR14 / TBAV607.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-09-21  |  7KB  |  245 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 TBSCAN.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. echo Please read the License.Doc file. By using the TBAV package you
  23. echo agree with our license agreement. You can print the License.Doc
  24. echo file by typing the following command on the DOS command line:
  25. echo    Copy License.Doc Lpt1
  26. echo Press Ctrl-C to abort this installation batch file, or
  27. pause
  28.  
  29. echo.
  30. echo This installation batch file of the shareware version of TBAV
  31. echo is not the same as the full featured installation program of the
  32. echo commercial version of TBAV. (The main reason for the omission of
  33. echo the installation program is to save disk space and to minimize
  34. echo download time). Therefore the installation procedure might
  35. echo differ from the procedure described in the manual.
  36. echo.
  37.  
  38. rem     * Copy the TBAV utilities if necessary
  39. if exist dummy.tst del dummy.tst >nul
  40. if exist %1\dummy.tst del %1\dummy.tst >nul
  41. echo TEST >%1\dummy.tst
  42. if exist dummy.tst goto filesexist
  43. if not exist %1\dummy.tst goto error4
  44. echo Copying files. Please wait...
  45. copy *.* %1 >nul
  46. :filesexist
  47. del %1\dummy.tst >nul
  48. if not exist %1\docs.exe goto nopack
  49. %1\docs -o %1
  50. del %1\docs.exe >nul
  51. :nopack
  52.  
  53. rem     * DOS has no interactive batch file commands,
  54. rem     * so we create a special program to solve that!
  55. rem     * the 'garbage' in the echo command is program code
  56. rem     * to read a key into an errorlevel, the program code
  57. rem     * will be copied into an executable file.
  58. echo ═êα╧┤L═! >%1\ask.com
  59.  
  60. echo.
  61. echo TbSetup will now generate or update the Anti-Vir.Dat file
  62. echo of the directory %1
  63. pause
  64. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  65. %1\TBSETUP %1
  66.  
  67. cls
  68. rem     * do not overwrite an existing TBAV setup.
  69. if exist %1\TBSTART.BAT goto ready
  70.  
  71. echo.
  72. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  73. echo directory. It is recommended to read the documentation of TBAV thoroughly
  74. echo and to make a customized setup. One of the advantages of the Thunderbyte
  75. echo Anti-Virus utilities is flexibility and the possibility to configure
  76. echo them to suit your needs in an optimal way.
  77. echo.
  78. echo This installation batch file helps you to setup the utilities in their
  79. echo most standard and non-customized way.
  80. echo Do you want to continue? (Y/n)
  81. %1\ask
  82. if not errorlevel 1 goto nosetup
  83.  
  84. rem     * make a backup of the AUTOEXEC.BAT file!
  85. echo.
  86. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  87. copy c:\autoexec.bat c:\autoexec.org >nul
  88.  
  89. rem     * create a TBSTART.BAT file in the TBAV directory.
  90. echo @echo off >%1\TBSTART.BAT
  91. echo echo off >>%1\TBSTART.BAT
  92.  
  93. echo.
  94. echo For easy access of the TBAV utilities it is recommended to put them
  95. echo into your PATH environment variable.
  96. echo Do you want to add %1 to your PATH statement? (Y/n)
  97. %1\ask
  98. if not errorlevel 1 goto dosetup
  99. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  100. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  101.  
  102. :dosetup
  103. echo.
  104. echo TbSetup will now process the C:\ drive to generate the Anti-Vir.Dat files.
  105. echo You may need to repeat this process for other drives.
  106. pause
  107. rem     * process the rest of the machine, but do not touch existing information!
  108. %1\TBSETUP newonly C:\
  109.  
  110. :tbdriver
  111. cls
  112. echo.
  113. echo The TBAV package contains some utilities that can be installed in the memory
  114. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  115. %1\ask
  116. if not errorlevel 1 goto autoscan
  117. rem     * create a TBSTART.BAT file in the TBAV directory.
  118. echo %1\tbdriver >>%1\TBSTART.BAT
  119.  
  120. echo.
  121. echo TBSCANX is a memory resident virus scanner.
  122. echo Do you want to install it? (Y/n)
  123. %1\ask
  124. if not errorlevel 1 goto tbcheck
  125. rem     * add the TbScanX statement to the TBSTART.BAT file.
  126. echo %1\tbscanx >>%1\TBSTART.BAT
  127.  
  128. :tbcheck
  129. echo.
  130. echo TBCHECK is a memory resident integrity checker.
  131. echo Do you want to install it? (Y/n)
  132. %1\ask
  133. if not errorlevel 1 goto tbmem
  134. rem     * add the TbCheck statement to the TBSTART.BAT file.
  135. echo %1\tbcheck >>%1\TBSTART.BAT
  136.  
  137. :tbmem
  138. echo.
  139. echo TBMEM is a resident memory guard.
  140. echo Do you want to install it? (Y/n)
  141. %1\ask
  142. if not errorlevel 1 goto tbfile
  143. rem     * add the TbMem statement to the TBSTART.BAT file.
  144. echo %1\tbmem >>%1\TBSTART.BAT
  145.  
  146. :tbfile
  147. echo.
  148. echo TBFILE is a resident file guard.
  149. echo Do you want to install it? (Y/n)
  150. %1\ask
  151. if not errorlevel 1 goto autoscan
  152. rem     * add the TbFile statement to the TBSTART.BAT file.
  153. echo %1\tbfile >>%1\TBSTART.BAT
  154.  
  155. :autoscan
  156. echo.
  157. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  158. %1\ask
  159. if not errorlevel 1 goto addcall
  160. rem     * add the TbScan statement to the TBSTART.BAT file.
  161. echo %1\tbscan once C:\ >>%1\TBSTART.BAT
  162.  
  163. :addcall
  164. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  165. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  166. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  167. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  168. del C:\TEMP.BAT >nul
  169. del C:\TEMP2.BAT >nul
  170.  
  171. :ready
  172. echo.
  173. echo Do you want to scan the C:\ disk now? (Y/n)
  174. %1\ask
  175. if not errorlevel 1 goto starttbav
  176. %1\tbscan C:\
  177.  
  178. :starttbav
  179. cls
  180. echo.
  181. echo TbSetup has been used to setup disk C:\. If your system has additional
  182. echo disk partitions, you have to use TBSETUP on your other partitions as
  183. echo well. Consult the documentation for more information!
  184. :nosetup
  185. echo.
  186. echo It is highly recommended to print the TBAV user manual.
  187. echo You can do this with the following DOS command:
  188. echo    Copy TBAV.DOC Lpt1
  189. echo.
  190. echo The menu program TBAV.EXE can be used to read the user manual.
  191. echo Do you want to start TBAV now? (Y/n)
  192. %1\ask
  193. if not errorlevel 1 goto end
  194. %1\TBAV
  195. goto end
  196.  
  197. :error1
  198. echo Error: Invalid program invocation!
  199. echo.
  200. echo Make sure that you invoke INSTALL.BAT in the directory where the
  201. echo TBAV utilities can be found!
  202. echo.
  203. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  204. echo A: [enter]
  205. echo INSTALL [path] [enter]
  206. goto end
  207.  
  208. :error2
  209. echo Error: No destination path specified!
  210. echo.
  211. echo You have to specify the destination path for the TBAV utilities!
  212. echo Even if the utilities are already in the destination path.
  213. echo.
  214. echo Example:
  215. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  216. echo INSTALL C:\TBAV
  217. goto end
  218.  
  219. :error3
  220. echo Error: Unable to creat destination directory %1
  221. echo.
  222. echo Make sure you enter an existing destination path or a path that can be created!
  223. goto end
  224.  
  225. :error4
  226. echo Error: Unable to copy files in directory %1
  227. echo.
  228. echo Disk full? Access denied?
  229. goto end
  230.  
  231. :error5
  232. echo Error: No target directory specified!
  233. echo.
  234. echo Make sure you enter a full destination path!
  235. echo %1 is not sufficient!
  236. echo.
  237. echo Example:
  238. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  239. echo INSTALL C:\TBAV
  240. goto end
  241.  
  242. :end
  243. if exist %1\ask.com del %1\ask.com >nul
  244.  
  245.