home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 23 / CDRmag23-0.iso / INDISP / Tbav / tbw31707 / INSTALL.BAT < prev    next >
DOS Batch File  |  1997-01-10  |  12KB  |  359 lines

  1. @echo off
  2. echo off
  3. echo        --- Thunderbyte Anti-Virus installation batch program ---
  4. echo.
  5.  
  6. rem     * Make sure that we can find the utilities in the current directory
  7. if not exist TBSCAN.EXE goto error1
  8.  
  9. rem     * Find out if we are upgrading a previous version in the current dir
  10. if exist TBSTART.BAT goto pathexists
  11.  
  12. rem     * Make sure that the user specified a destination path
  13. if %1X==X goto error2
  14.  
  15. rem     * Make sure the target path exists or can be created
  16. if exist %1\nul goto pathexists
  17. md %1
  18. if not exist %1\nul goto error3
  19. :pathexists
  20.  
  21. rem     * Make sure user did not type something like 'C:' :-)
  22. if exist %1\CONFIG.SYS goto error5
  23.  
  24. echo Please read the License.Doc file. By using the TBAV package you
  25. echo agree with our license agreement. You can print the License.Doc
  26. echo file by typing the following command on the DOS command line:
  27. echo    Copy License.Doc Lpt1
  28. echo Press Ctrl-C to abort this installation batch file, or
  29. pause
  30.  
  31. echo.
  32. echo This installation batch file of the shareware version of TBAV
  33. echo is not the same as the full featured installation program of the
  34. echo commercial version of TBAV. (The main reason for the omission of
  35. echo the installation program is to save disk space and to minimize
  36. echo download time). Therefore the installation procedure might
  37. echo differ from the procedure described in the manual.
  38. echo.
  39.  
  40. rem     * If TbScanX is active, de-activate it.
  41. if not exist SCANX goto notres
  42. if exist %1\tbscanx.exe %1\tbscanx /off
  43.  
  44. :notres
  45. rem     * Copy the TBAV utilities if necessary
  46. if exist dummy.tst del dummy.tst >nul
  47. if exist %1\dummy.tst del %1\dummy.tst >nul
  48. echo TEST >%1\dummy.tst
  49. if exist dummy.tst goto filesexists
  50. if not exist %1\dummy.tst goto error4
  51. echo TbSetup will now delete the Anti-Vir.Dat file of a previous
  52. echo TBAV version if it exists in directory %1
  53. pause
  54. rem     * If Anti-Vir.Dat already exists and is hidden, delete it...
  55. tbsetup %1 remove
  56. cls
  57. echo Copying files. Please wait...
  58. if exist addendum.doc copy addendum.doc %1 >nul
  59. if exist agents.doc copy agents.doc %1 >nul
  60. if exist anti-vir.dat copy anti-vir.dat %1 >nul
  61. if exist appnotes.doc copy appnotes.doc %1 >nul
  62. if exist esass.pgp copy esass.pgp %1 >nul
  63. if exist file_id.diz copy file_id.diz %1 >nul
  64. if exist install.bat copy install.bat %1 >nul
  65. if exist license.doc copy license.doc %1 >nul
  66. if exist makeresc.bat copy makeresc.bat %1 >nul
  67. if exist no_vsum.doc copy no_vsum.doc %1 >nul
  68. if exist register.exe copy register.exe %1 >nul
  69. if exist report.doc copy report.doc %1 >nul
  70. if exist security.doc copy security.doc %1 >nul
  71. if exist tbav.doc copy tbav.doc %1 >nul
  72. if exist tbav.exe copy tbav.exe %1 >nul
  73. if exist tbav.lng copy tbav.lng %1 >nul
  74. if exist tbav.msg copy tbav.msg %1 >nul
  75. if exist tbcheck.exe copy tbcheck.exe %1 >nul
  76. if exist tbclean.exe copy tbclean.exe %1 >nul
  77. if exist tbdel.com copy tbdel.com %1 >nul
  78. if exist tbdisk.exe copy tbdisk.exe %1 >nul
  79. if exist tbdriver.exe copy tbdriver.exe %1 >nul
  80. if exist tbdriver.lng copy tbdriver.lng %1 >nul
  81. if exist tbfile.exe copy tbfile.exe %1 >nul
  82. if exist tbkey.exe copy tbkey.exe %1 >nul
  83. if exist tblog.exe copy tblog.exe %1 >nul
  84. if exist tbmem.exe copy tbmem.exe %1 >nul
  85. if exist tbscan.eci copy tbscan.eci %1 >nul
  86. if exist tbscan.exe copy tbscan.exe %1 >nul
  87. if exist tbscan16.exe copy tbscan16.exe %1 >nul
  88. if exist tbscan32.exe copy tbscan32.exe %1 >nul
  89. if exist tbscan.lng copy tbscan.lng %1 >nul
  90. if exist tbscan.sig copy tbscan.sig %1 >nul
  91. if exist tbscanx.exe copy tbscanx.exe %1 >nul
  92. if exist tbsetup.dat copy tbsetup.dat %1 >nul
  93. if exist tbsetup.exe copy tbsetup.exe %1 >nul
  94. if exist tbutil.exe copy tbutil.exe %1 >nul
  95. if exist tbutil.lng copy tbutil.lng %1 >nul
  96. if exist veldman.pgp copy veldman.pgp %1 >nul
  97. if exist esass.pgp copy esass.pgp %1 >nul
  98. if exist tbav.faq copy tbav.faq %1 >nul
  99. if exist tbmon.com copy tbmon.com %1 >nul
  100. copy whatsnew.* %1 >nul
  101. if %_4ver%x==x copy descript.ion %1 >nul
  102.  
  103. :filesexists
  104. del %1\dummy.tst >nul
  105. if not exist %1\docs.exe goto nopack
  106. %1\docs -o %1
  107. del %1\docs.exe >nul
  108. :nopack
  109.  
  110. rem     * DOS has no interactive batch file commands,
  111. rem     * so we create a special program to solve that!
  112. rem     * the 'garbage' in the echo command is program code
  113. rem     * to read a key into an errorlevel, the program code
  114. rem     * will be copied into an executable file.
  115. echo ═êα╧┤L═! >%1\ask.com
  116.  
  117. echo.
  118. echo TbSetup will now generate or update the Anti-Vir.Dat file
  119. echo of the directory %1
  120. pause
  121. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  122. %1\TBSETUP %1
  123.  
  124. cls
  125. rem     * do not overwrite an existing TBAV setup.
  126. if exist %1\TBSTART.BAT goto upgrade
  127.  
  128. echo.
  129. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  130. echo directory. It is recommended to read the documentation of TBAV thoroughly
  131. echo and to make a customized setup. One of the advantages of the Thunderbyte
  132. echo Anti-Virus utilities is flexibility and the possibility to configure
  133. echo them to suit your needs in an optimal way.
  134. echo.
  135. echo This installation batch file helps you to setup the utilities in their
  136. echo most standard and non-customized way.
  137. echo Do you want to continue? (Y/n)
  138. %1\ask
  139. if not errorlevel 1 goto nosetup
  140.  
  141. rem     * make a backup of the AUTOEXEC.BAT file!
  142. echo.
  143. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  144. copy c:\autoexec.bat c:\autoexec.org >nul
  145.  
  146. rem     * create a TBSTART.BAT file in the TBAV directory.
  147. echo @echo off >%1\TBSTART.BAT
  148. echo echo off >>%1\TBSTART.BAT
  149.  
  150. echo.
  151. echo For easy access of the TBAV utilities it is recommended to put them
  152. echo into your PATH environment variable.
  153. echo Do you want to add %1 to your PATH statement? (Y/n)
  154. %1\ask
  155. if not errorlevel 1 goto dosetup
  156. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  157. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  158.  
  159. :dosetup
  160. echo.
  161. echo TbSetup will now process your drives to generate the Anti-Vir.Dat files.
  162. pause
  163. rem     * process the rest of the machine, but do not touch existing information!
  164. %1\TbSetup NewOnly AllDrives
  165.  
  166. :tbdriver
  167. cls
  168. echo.
  169. echo The TBAV package contains some utilities that can be installed in the memory
  170. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  171. %1\ask
  172. if not errorlevel 1 goto autoscan
  173. rem     * create a TBSTART.BAT file in the TBAV directory.
  174. echo %1\TbDriver >>%1\TBSTART.BAT
  175.  
  176. echo.
  177. echo TBSCANX is a memory resident virus scanner.
  178. echo Do you want to install it? (Y/n)
  179. %1\ask
  180. if not errorlevel 1 goto tbcheck
  181. rem     * add the TbScanX statement to the TBSTART.BAT file.
  182. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  183.  
  184. :tbcheck
  185. echo.
  186. echo TBCHECK is a memory resident integrity checker.
  187. echo Do you want to install it? (Y/n)
  188. %1\ask
  189. if not errorlevel 1 goto tbmem
  190. rem     * add the TbCheck statement to the TBSTART.BAT file.
  191. echo %1\TbCheck noavok=ab >>%1\TBSTART.BAT
  192.  
  193. :tbmem
  194. echo.
  195. echo TBMEM is a resident memory guard.
  196. echo Do you want to install it? (Y/n)
  197. %1\ask
  198. if not errorlevel 1 goto tbfile
  199. rem     * add the TbMem statement to the TBSTART.BAT file.
  200. echo %1\TbMem >>%1\TBSTART.BAT
  201.  
  202. :tbfile
  203. echo.
  204. echo TBFILE is a resident file guard.
  205. echo Do you want to install it? (Y/n)
  206. %1\ask
  207. if not errorlevel 1 goto autoscan
  208. rem     * add the TbFile statement to the TBSTART.BAT file.
  209. echo %1\TbFile >>%1\TBSTART.BAT
  210.  
  211. :autoscan
  212. echo.
  213. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  214. %1\ask
  215. if not errorlevel 1 goto addcall
  216. rem     * add the TbScan statement to the TBSTART.BAT file.
  217. echo %1\TbScan Once AllDrives >>%1\TBSTART.BAT
  218.  
  219. :addcall
  220. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  221. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  222. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  223. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  224. del C:\TEMP.BAT >nul
  225. del C:\TEMP2.BAT >nul
  226.  
  227. :ready
  228. echo.
  229. echo Do you want to scan your drives now? (Y/n)
  230. %1\ask
  231. if not errorlevel 1 goto starttbav
  232. %1\TbScan AllDrives
  233.  
  234. :starttbav
  235. cls
  236. :nosetup
  237. echo.
  238. echo It is highly recommended to print the TBAV user manual.
  239. echo You can do this with the following DOS command:
  240. echo    Copy TBAV.DOC Lpt1
  241. echo.
  242. echo If you are upgrading from previous TBAV versions, it is recommended
  243. echo to print the WHATSNEW files and the Addendum.Doc.
  244. echo You can do this with the following DOS command:
  245. echo    Copy WHATSNEW.* Lpt1
  246. echo    Copy ADDENDUM.DOC Lpt1
  247. echo.
  248. echo The menu program TBAV.EXE can be used to read the documentation files.
  249. echo Do you want to start TBAV now? (Y/n)
  250. %1\ask
  251. if not errorlevel 1 goto flush
  252. %1\TBAV
  253. goto end
  254.  
  255. :upgrade
  256. echo.
  257. rem     * Delete all stuff we don't support anymore
  258. echo Install.Bat will delete some obsolete files from previous TBAV
  259. echo versions which are not supported anymore.
  260. echo.
  261. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  262. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  263. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  264. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  265. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  266. if exist %1\*.AVR del %1\*.AVR >nul
  267. if exist %1\MTE.Doc del %1\MTE.Doc >nul
  268. if exist %1\Washburn.Doc del %1\Washburn.Doc >nul
  269. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  270. if exist %1\TbRescue.* del %1\TbRescue.* >nul
  271. if exist %1\TBAV.CFG del %1\TBAV.CFG >nul
  272. if exist %1\TbShell.* del %1\TbShell.* >nul
  273. if exist %1\register.exe ren %1\register.exe reg.exe >nul
  274. if exist %1\register.txt ren %1\register.txt reg.txt >nul
  275. if exist %1\register.* del %1\register.* >nul
  276. if exist %1\reg.exe ren %1\reg.exe register.exe >nul
  277. if exist %1\reg.txt ren %1\reg.txt register.txt >nul
  278. if exist %1\TbGarble.* del %1\TbGarble.* >nul
  279. if exist %1\GetBoot.* del %1\GetBoot.* >nul
  280. if exist %1\Intro.Doc del %1\Intro.Doc >nul
  281. if exist %1\TbSetup.Doc del %1\TbSetup.Doc >nul
  282. if exist %1\TbUtil.Doc del %1\TbUtil.Doc >nul
  283. if exist %1\TbScan.Doc del %1\TbScan.Doc >nul
  284. if exist %1\TbClean.Doc del %1\TbClean.Doc >nul
  285. if exist %1\StackMan.Doc del %1\StackMan.Doc >nul
  286. if exist %1\TbGensig.Exe del %1\TbGensig.Exe >nul
  287. if exist %1\TbGensig.Doc del %1\TbGensig.Doc >nul
  288. if exist %1\TbDriver.Doc del %1\TbDriver.Doc >nul
  289. if exist %1\TbScanX.Doc del %1\TbScanX.Doc >nul
  290. if exist %1\TbCheck.Doc del %1\TbCheck.Doc >nul
  291. if exist %1\TbMem.Doc del %1\TbMem.Doc >nul
  292. if exist %1\TbFile.Doc del %1\TbFile.Doc >nul
  293. if exist %1\TbDisk.Doc del %1\TbDisk.Doc >nul
  294. if exist %1\TbDel.Doc del %1\TbDel.Doc >nul
  295. if exist %1\Upgrade.Bat del %1\Upgrade.Bat >nul
  296. if exist %1\TBAV.ICO del %1\TBAV.ICO >nul
  297. if exist %1\TBAV.PIF del %1\TBAV.PIF >nul
  298. echo All obsolete TBAV files have been removed.
  299. echo.
  300. if not exist %1\StackMan.Exe goto ready
  301. echo Note: StackMan.Exe is not necessary anymore to solve TBAV problems.
  302. echo StackMan is therefor no longer supplied with the shareware TBAV package.
  303. echo If you do not use StackMan, you can delete it from the TBAV directory.
  304. goto ready
  305.  
  306. :error1
  307. echo Error: Invalid program invocation!
  308. echo.
  309. echo Make sure that you invoke INSTALL.BAT in the directory where the
  310. echo TBAV utilities can be found!
  311. echo.
  312. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  313. echo A: [enter]
  314. echo INSTALL [path] [enter]
  315. goto end
  316.  
  317. :error2
  318. echo Error: No destination path specified!
  319. echo.
  320. echo You have to specify the destination path for the TBAV utilities!
  321. echo Even if the utilities are already in the destination path.
  322. echo.
  323. echo Example:
  324. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  325. echo INSTALL C:\TBAV
  326. goto end
  327.  
  328. :error3
  329. echo Error: Unable to creat destination directory %1
  330. echo.
  331. echo Make sure you enter an existing destination path or a path that can be created!
  332. goto end
  333.  
  334. :error4
  335. echo Error: Unable to copy files in directory %1
  336. echo.
  337. echo Disk full? Access denied?
  338. goto end
  339.  
  340. :error5
  341. echo Error: No target directory specified!
  342. echo.
  343. echo Make sure you enter a full destination path!
  344. echo %1 is not sufficient!
  345. echo.
  346. echo Example:
  347. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  348. echo INSTALL C:\TBAV
  349. goto end
  350.  
  351. :flush
  352. echo.
  353. echo If you have a disk cache installed, wait a few seconds to allow the
  354. echo cache to flush the buffers, and reboot...
  355.  
  356. :end
  357. if exist %1\ask.com del %1\ask.com >nul
  358.  
  359.