home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Multimedia 3 / CD_1.iso / viruskil / solomon / lvirnxt.bat < prev    next >
DOS Batch File  |  1994-11-10  |  2KB  |  78 lines

  1. @echo off
  2. cls
  3. rem  Author: A.J. Bruce                     Date: 07.01.94
  4. rem  Version: 4.3
  5. rem  Name: LVIRNXT.BAT
  6. rem  Desc: Check all hard drives on a PC for virusses when logging on
  7. rem        to a server. A complete scan of all drives is made.
  8. rem        All local drives will be scanned.
  9. rem
  10. rem  Modification History:
  11. rem  Version: 4.0
  12. rem        Documentation now LVIRCHK.DOC
  13. rem
  14.   v:
  15.   cd \appl\solomon
  16. :Welok
  17.   if exist c:\viruschk.tmp del c:\viruschk.tmp
  18.   echo Virus control program > c:\viruschk.lst
  19.   cls
  20.   be wi 1,2,09,78,bright yellow on blue
  21.   be ro 2,59,"Version: 7.03/6.68",bright yellow
  22.   be ro 3,10,"Your PC will now be checked for viruses.",bright yellow
  23.   be ro 5,10,"Please be patient.....",bright yellow
  24. :Scan
  25.   be ro 07,20,"Checking local drives",blinking white on blue
  26.   be ro 21,01
  27.   findviru.exe /local /P=N /B=Y /E=Y /silent /oneonly
  28.   if errorlevel = 255 goto Findc
  29.   if errorlevel = 3   goto Error1
  30.   if errorlevel = 2   goto Alarm
  31.   if errorlevel = 1   goto Error1
  32.   if errorlevel = 0   goto Ok
  33. :Ok
  34.   be ro 07,20," Check completed: OK  ",bright yellow
  35.   if exist c:\viruschk.tmp del c:\viruschk.tmp
  36.   goto Einde
  37. Rem
  38. Rem  End processing when a virus has been found.
  39. Rem
  40. :Alarm
  41. Rem  copy c:\viruschk.lst + c:\viruschk.tmp c:\viruschk.lst > nul
  42.   if exist c:\viruschk.tmp del c:\viruschk.tmp
  43.   echo 
  44.   be ro 07,20," BAD BAD BAD BAD BAD  ",bright red
  45.   if exist c:\virus.bad  del c:\virus.bad
  46.   ren c:\viruschk.lst virus.bad > nul
  47.   ncopy c:\virus.bad s:%N_UID%.vir > nul
  48.   if exist c:\viruschk.ctl del c:\viruschk.ctl
  49.   if exist c:\viruschk.tmp del c:\viruschk.tmp
  50.   if exist c:\viruschk.not del c:\viruschk.not
  51.   be lvirchk.sc1
  52.   be ask "", timeout=10
  53.   c:
  54.   z:\public\logout
  55.   goto Eeinde
  56. :Error1
  57.   be ro 15,0
  58.   ECHO  ERROR  The virus control program has ended with an error.
  59.   ECHO  ERROR  Please contact your local PC support.
  60.   ECHO  ERROR  The Login will be completed normally.
  61.   ECHO  ERROR  Press any key to continue.
  62.   be ask ""
  63.   goto Eeinde
  64. :Einde
  65.   ren c:\viruschk.not viruschk.ctl > nul
  66.   if exist c:\virus.bad  del c:\virus.bad      > nul
  67. :Eeinde
  68.   cd \
  69.   c:
  70.   if exist c:\viruschk.lst del c:\viruschk.lst > nul
  71.   if exist c:\viruschk.tmp del c:\viruschk.tmp > nul
  72.   if exist c:\viruschk.not del c:\viruschk.not > nul
  73.   be ro 24,0
  74.   rem
  75.   rem  Finished.
  76.   rem
  77. :Finish
  78.