home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Games 3 / cd.iso / viruskil / tbav626 / install.bat < prev    next >
DOS Batch File  |  1994-10-24  |  11KB  |  355 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 tblanmsg.exe %1 >nul
  85. copy tblog.exe %1 >nul
  86. copy tbmem.exe %1 >nul
  87. copy tbscan.exe %1 >nul
  88. copy tbscan.lng %1 >nul
  89. copy tbscan.sig %1 >nul
  90. copy tbscanx.exe %1 >nul
  91. copy tbsetup.dat %1 >nul
  92. copy tbsetup.exe %1 >nul
  93. copy tbutil.exe %1 >nul
  94. copy tbutil.lng %1 >nul
  95. copy veldman.pgp %1 >nul
  96. copy whatsnew.* %1 >nul
  97. if %_4ver%x==x copy descript.ion %1 >nul
  98.  
  99. :filesexists
  100. del %1\dummy.tst >nul
  101. if not exist %1\docs.exe goto nopack
  102. %1\docs -o %1
  103. del %1\docs.exe >nul
  104. :nopack
  105.  
  106. rem     * DOS has no interactive batch file commands,
  107. rem     * so we create a special program to solve that!
  108. rem     * the 'garbage' in the echo command is program code
  109. rem     * to read a key into an errorlevel, the program code
  110. rem     * will be copied into an executable file.
  111. echo ═êα╧┤L═! >%1\ask.com
  112.  
  113. echo.
  114. echo TbSetup will now generate or update the Anti-Vir.Dat file
  115. echo of the directory %1
  116. pause
  117. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  118. %1\TBSETUP %1
  119.  
  120. cls
  121. rem     * do not overwrite an existing TBAV setup.
  122. if exist %1\TBSTART.BAT goto upgrade
  123.  
  124. echo.
  125. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  126. echo directory. It is recommended to read the documentation of TBAV thoroughly
  127. echo and to make a customized setup. One of the advantages of the Thunderbyte
  128. echo Anti-Virus utilities is flexibility and the possibility to configure
  129. echo them to suit your needs in an optimal way.
  130. echo.
  131. echo This installation batch file helps you to setup the utilities in their
  132. echo most standard and non-customized way.
  133. echo Do you want to continue? (Y/n)
  134. %1\ask
  135. if not errorlevel 1 goto nosetup
  136.  
  137. rem     * make a backup of the AUTOEXEC.BAT file!
  138. echo.
  139. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  140. copy c:\autoexec.bat c:\autoexec.org >nul
  141.  
  142. rem     * create a TBSTART.BAT file in the TBAV directory.
  143. echo @echo off >%1\TBSTART.BAT
  144. echo echo off >>%1\TBSTART.BAT
  145.  
  146. echo.
  147. echo For easy access of the TBAV utilities it is recommended to put them
  148. echo into your PATH environment variable.
  149. echo Do you want to add %1 to your PATH statement? (Y/n)
  150. %1\ask
  151. if not errorlevel 1 goto dosetup
  152. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  153. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  154.  
  155. :dosetup
  156. echo.
  157. echo TbSetup will now process your drives to generate the Anti-Vir.Dat files.
  158. pause
  159. rem     * process the rest of the machine, but do not touch existing information!
  160. %1\TbSetup NewOnly AllDrives
  161.  
  162. :tbdriver
  163. cls
  164. echo.
  165. echo The TBAV package contains some utilities that can be installed in the memory
  166. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  167. %1\ask
  168. if not errorlevel 1 goto autoscan
  169. rem     * create a TBSTART.BAT file in the TBAV directory.
  170. echo %1\TbDriver >>%1\TBSTART.BAT
  171.  
  172. echo.
  173. echo TBSCANX is a memory resident virus scanner.
  174. echo Do you want to install it? (Y/n)
  175. %1\ask
  176. if not errorlevel 1 goto tbcheck
  177. rem     * add the TbScanX statement to the TBSTART.BAT file.
  178. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  179.  
  180. :tbcheck
  181. echo.
  182. echo TBCHECK is a memory resident integrity checker.
  183. echo Do you want to install it? (Y/n)
  184. %1\ask
  185. if not errorlevel 1 goto tbmem
  186. rem     * add the TbCheck statement to the TBSTART.BAT file.
  187. echo %1\TbCheck noavok=ab >>%1\TBSTART.BAT
  188.  
  189. :tbmem
  190. echo.
  191. echo TBMEM is a resident memory guard.
  192. echo Do you want to install it? (Y/n)
  193. %1\ask
  194. if not errorlevel 1 goto tbfile
  195. rem     * add the TbMem statement to the TBSTART.BAT file.
  196. echo %1\TbMem >>%1\TBSTART.BAT
  197.  
  198. :tbfile
  199. echo.
  200. echo TBFILE is a resident file guard.
  201. echo Do you want to install it? (Y/n)
  202. %1\ask
  203. if not errorlevel 1 goto autoscan
  204. rem     * add the TbFile statement to the TBSTART.BAT file.
  205. echo %1\TbFile >>%1\TBSTART.BAT
  206.  
  207. :autoscan
  208. echo.
  209. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  210. %1\ask
  211. if not errorlevel 1 goto addcall
  212. rem     * add the TbScan statement to the TBSTART.BAT file.
  213. echo %1\TbScan Once AllDrives >>%1\TBSTART.BAT
  214.  
  215. :addcall
  216. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  217. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  218. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  219. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  220. del C:\TEMP.BAT >nul
  221. del C:\TEMP2.BAT >nul
  222.  
  223. :ready
  224. echo.
  225. echo Do you want to scan your drives now? (Y/n)
  226. %1\ask
  227. if not errorlevel 1 goto starttbav
  228. %1\TbScan AllDrives
  229.  
  230. :starttbav
  231. cls
  232. :nosetup
  233. echo.
  234. echo It is highly recommended to print the TBAV user manual.
  235. echo You can do this with the following DOS command:
  236. echo    Copy TBAV.DOC Lpt1
  237. echo.
  238. echo If you are upgrading from previous TBAV versions, it is recommended
  239. echo to print the WHATSNEW files and the Addendum.Doc.
  240. echo You can do this with the following DOS command:
  241. echo    Copy WHATSNEW.* Lpt1
  242. echo    Copy ADDENDUM.DOC Lpt1
  243. echo.
  244. echo The menu program TBAV.EXE can be used to read the documentation files.
  245. echo Do you want to start TBAV now? (Y/n)
  246. %1\ask
  247. if not errorlevel 1 goto flush
  248. %1\TBAV
  249. goto end
  250.  
  251. :upgrade
  252. echo.
  253. rem     * Delete all stuff we don't support anymore
  254. echo Install.Bat will delete some obsolete files from previous TBAV
  255. echo versions which are not supported anymore.
  256. echo.
  257. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  258. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  259. if exist %1\*.Hlp del %1\*.Hlp >nul
  260. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  261. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  262. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  263. if exist %1\*.AVR del %1\*.AVR >nul
  264. if exist %1\MTE.Doc del %1\MTE.Doc >nul
  265. if exist %1\Washburn.Doc del %1\Washburn.Doc >nul
  266. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  267. if exist %1\TbRescue.* del %1\TbRescue.* >nul
  268. if exist %1\TBAV.CFG del %1\TBAV.CFG >nul
  269. if exist %1\TbShell.* del %1\TbShell.* >nul
  270. if exist %1\register.exe ren %1\register.exe reg.exe >nul
  271. if exist %1\register.txt ren %1\register.txt reg.txt >nul
  272. if exist %1\register.* del %1\register.* >nul
  273. if exist %1\reg.exe ren %1\reg.exe register.exe >nul
  274. if exist %1\reg.txt ren %1\reg.txt register.txt >nul
  275. if exist %1\TbGarble.* del %1\TbGarble.* >nul
  276. if exist %1\GetBoot.* del %1\GetBoot.* >nul
  277. if exist %1\Intro.Doc del %1\Intro.Doc >nul
  278. if exist %1\TbSetup.Doc del %1\TbSetup.Doc >nul
  279. if exist %1\TbUtil.Doc del %1\TbUtil.Doc >nul
  280. if exist %1\TbScan.Doc del %1\TbScan.Doc >nul
  281. if exist %1\TbClean.Doc del %1\TbClean.Doc >nul
  282. if exist %1\StackMan.Doc del %1\StackMan.Doc >nul
  283. if exist %1\TbGensig.Doc del %1\TbGensig.Doc >nul
  284. if exist %1\TbDriver.Doc del %1\TbDriver.Doc >nul
  285. if exist %1\TbScanX.Doc del %1\TbScanX.Doc >nul
  286. if exist %1\TbCheck.Doc del %1\TbCheck.Doc >nul
  287. if exist %1\TbMem.Doc del %1\TbMem.Doc >nul
  288. if exist %1\TbFile.Doc del %1\TbFile.Doc >nul
  289. if exist %1\TbDisk.Doc del %1\TbDisk.Doc >nul
  290. if exist %1\TbDel.Doc del %1\TbDel.Doc >nul
  291. if exist %1\Upgrade.Bat del %1\Upgrade.Bat >nul
  292. if exist %1\TBAV.ICO del %1\TBAV.ICO >nul
  293. if exist %1\TBAV.PIF del %1\TBAV.PIF >nul
  294. echo All obsolete TBAV files have been removed.
  295. echo.
  296. if not exist %1\StackMan.Exe goto ready
  297. echo Note: StackMan.Exe is not necessary anymore to solve TBAV problems.
  298. echo StackMan is therefor no longer supplied with the shareware TBAV package.
  299. echo If you do not use StackMan, you can delete it from the TBAV directory.
  300. goto ready
  301.  
  302. :error1
  303. echo Error: Invalid program invocation!
  304. echo.
  305. echo Make sure that you invoke INSTALL.BAT in the directory where the
  306. echo TBAV utilities can be found!
  307. echo.
  308. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  309. echo A: [enter]
  310. echo INSTALL [path] [enter]
  311. goto end
  312.  
  313. :error2
  314. echo Error: No destination path specified!
  315. echo.
  316. echo You have to specify the destination path for the TBAV utilities!
  317. echo Even if the utilities are already in the destination path.
  318. echo.
  319. echo Example:
  320. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  321. echo INSTALL C:\TBAV
  322. goto end
  323.  
  324. :error3
  325. echo Error: Unable to creat destination directory %1
  326. echo.
  327. echo Make sure you enter an existing destination path or a path that can be created!
  328. goto end
  329.  
  330. :error4
  331. echo Error: Unable to copy files in directory %1
  332. echo.
  333. echo Disk full? Access denied?
  334. goto end
  335.  
  336. :error5
  337. echo Error: No target directory specified!
  338. echo.
  339. echo Make sure you enter a full destination path!
  340. echo %1 is not sufficient!
  341. echo.
  342. echo Example:
  343. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  344. echo INSTALL C:\TBAV
  345. goto end
  346.  
  347. :flush
  348. echo.
  349. echo If you have a disk cache installed, wait a few seconds to allow the
  350. echo cache to flush the buffers, and reboot...
  351.  
  352. :end
  353. if exist %1\ask.com del %1\ask.com >nul
  354.  
  355.