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