home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 June / june_2001.iso / Security / McAfee_Virus_Scan / setup.exe / Data.Cab / F7509_EDisk.Img / AUTOEXEC.BAT next >
Encoding:
DOS Batch File  |  1998-09-01  |  13.4 KB  |  330 lines

  1. @ECHO OFF
  2. REM ******************************************************************
  3. REM *****  MCAFEE EMERGENCY BOOT DISKETTE      VERSION 1.0       *****
  4. REM ******************************************************************
  5.  
  6. REM **** HOUSE KEEPING ****
  7. SET ERROR17=0
  8. SET ERROR10=0
  9. CLS
  10.  
  11. REM ******************************************************************
  12. REM ****  MAKE SURE ALL THE FILES ARE HERE                      ******
  13. REM ******************************************************************
  14. A:\SELFCHEK.EXE A:\PACKING.LST Validation codes:
  15. IF NOT ERRORLEVEL 1 GOTO SelfCheckOK
  16.  
  17. ECHO One or more of the required files are missing from this diskette.
  18. ECHO Please check the PACKING.LST file against the directory listing
  19. ECHO to ensure they are present.  If files are missing then this
  20. ECHO diskette may have been tampered with or altered.
  21.  
  22. A:\GETREPLY.EXE Do you wish to continue anyway (Y/N)? ;yn
  23. IF ERRORLEVEL 2 GOTO AbortSLFCHK
  24.  
  25.  
  26. :SelfCheckOK
  27. CLS
  28. ECHO [===============================================================]
  29. ECHO [                                                               ]
  30. ECHO [                  MCAFEE VIRUS REMOVAL TOOL                    ]
  31. ECHO [                                                               ]
  32. ECHO [  THIS DISKETTE IS USED TO SIMPLIFY THE TASK OF REMOVING A     ]
  33. ECHO [  VIRUS FROM YOUR COMPUTER.  IT IS IMPORTANT TO ENSURE THAT    ]
  34. ECHO [  YOU COLD BOOTED YOUR MACHINE BEFORE USING THIS DISKETTE.     ]
  35. ECHO [  A COLD BOOT MEANS THAT THE POWER TO THE COMPUTER IS TURNED   ]
  36. ECHO [  OFF AND THEN TURNED ON WITH THIS DISKETTE IN THE A: DRIVE.   ]
  37. ECHO [                                                               ]
  38. ECHO [===============================================================]
  39.  
  40. A:\GETREPLY.EXE Did you cycle the power off and on (Y/N)? ;yn
  41. IF ERRORLEVEL 2 GOTO NoCyclePWR
  42.  
  43. :DoScan
  44. REM ******************************************************************
  45. REM **** PERFORM THE SCAN
  46. REM ******************************************************************
  47.  
  48. CLS
  49. ECHO MCAFEE WILL NOW PERFORM A SCAN OF ALL LOCAL DRIVES FOR VIRUSES
  50. ECHO AND ATTEMPT TO CLEAN ANY INFECTIONS THAT ARE FOUND.  CERTAIN
  51. ECHO VIRUSES MAY REQUIRE YOU TO REBOOT AND PERFORM THIS SCAN AGAIN.
  52. ECHO IF THE SCAN STALLS FOR MORE THAN 30 SECONDS THEN TURN THE POWER
  53. ECHO OFF AND THEN BACK ON AGAIN WITH THIS DISKETTE IN THE A: DRIVE.
  54. PAUSE
  55.  
  56. CLS
  57. SCAN /ADL /CLEAN /ALL /NOBREAK
  58. REM Scan C:\Infected /all /clean
  59. PAUSE
  60.  
  61. :DoErrors
  62. REM ******************************************************************
  63. REM ***  DO ERROR CHECKING
  64. REM ******************************************************************
  65. IF ERRORLEVEL 100 GOTO ErrorDOS
  66. IF ERRORLEVEL 19 GOTO VirusFound
  67. IF ERRORLEVEL 17 GOTO NoTarget
  68. IF ERRORLEVEL 16 GOTO BadAccess
  69. IF ERRORLEVEL 15 GOTO BadScanEXE
  70. IF ERRORLEVEL 14 GOTO Update
  71. IF ERRORLEVEL 13 GOTO VirusFound
  72. IF ERRORLEVEL 12 GOTO BadClean
  73. IF ERRORLEVEL 11 GOTO ProgError
  74. IF ERRORLEVEL 10 GOTO VirusInMemory
  75. IF ERRORLEVEL 8  GOTO MissingDat
  76. IF ERRORLEVEL 6  GOTO ProgError
  77. IF ERRORLEVEL 5  GOTO ProgError
  78. IF ERRORLEVEL 3  GOTO BadAccess
  79. IF ERRORLEVEL 2  GOTO BadDats
  80. IF ERRORLEVEL 1  GOTO BadAccess
  81. IF ERRORLEVEL 0  GOTO Nada
  82.  
  83. REM ******************************************************************
  84. REM ******  ERROR CHECKING ROUTINES                             ******
  85. REM ******************************************************************
  86.  
  87. :Nada
  88. REM ******************************************************************
  89. REM *** errorlevel 0
  90. REM ******************************************************************
  91. CLS
  92. IF %ERROR10%==1 GOTO ExitNoMem
  93. ECHO No viruses were found in memory, or on any local drives!
  94. ECHO You should remove this diskette and reboot your system.
  95. GOTO Exit
  96.  
  97. :BadAccess
  98. REM ******************************************************************
  99. REM *** errorlevels 1, 3 & 16
  100. REM ******************************************************************
  101. CLS
  102. ECHO An error has occurred while trying to access one of your local
  103. ECHO drives.  Please reboot the machine with this diskette in the A: 
  104. ECHO drive and reattempt the procedure.  If this error continues then
  105. ECHO it may be necessary to run some kind of disk diagnostic software
  106. ECHO on the drive before re-attempting the removal procedure.
  107. GOTO Exit
  108.  
  109. :BadDats
  110. REM ******************************************************************
  111. REM *** errorlevel 2
  112. REM ******************************************************************
  113. CLS
  114. ECHO An error occurred while trying to read the data files.  This could
  115. ECHO mean that either the diskette is damaged, has been modified or the
  116. ECHO floppy drive is slightly misaligned.  If you have a second machine
  117. ECHO you could boot from this disk and verify if the floppy drive is OK.
  118. ECHO Since the diskette is write protected it is unlikely that the file(s)
  119. ECHO were modified unless the write-protection was forcefully over-ridden.
  120. GOTO Exit
  121.  
  122. :ProgError
  123. REM ******************************************************************
  124. REM *** errorlevels 5, 6 and 11
  125. REM ******************************************************************
  126. CLS
  127. ECHO There has been a problem with the VirusScan program. This could
  128. ECHO be caused by a corrupted file, low memory or a conflict with a
  129. ECHO piece of hardware. It is also possible that a virus is active and
  130. ECHO interfering with the program. Please cold boot this system again
  131. ECHO with this disk and try the scan again. If this problem continues
  132. ECHO please consult your manual on how to get a new copy of this disk.
  133. GOTO Exit
  134.  
  135. :MissingDat
  136. REM ******************************************************************
  137. REM *** errorlevel 8
  138. REM ******************************************************************
  139. CLS
  140. ECHO One or more of the following files are missing:  SCAN.DAT, NAMES.DAT.
  141. ECHO There is a good chance that this diskette may have been modified.
  142. ECHO Please cold boot this system again with this disk and try the scan
  143. ECHO again. If this problem continues please consult your manual on how to
  144. ECHO get a new copy of this disk.
  145. GOTO Exit
  146.  
  147.  
  148. :VirusInMemory
  149. REM ******************************************************************
  150. REM *** errorlevel 10
  151. REM ******************************************************************
  152. CLS
  153. ECHO    W       A       R       N       I       N       G
  154. ECHO .
  155. ECHO The signature of a virus was found in memory while performing
  156. ECHO the memory scan.  It is unlikely that this disk is infected
  157. ECHO as long as the write protect tab on the diskette was never
  158. ECHO bypassed.  There are other possibilities.  You should check
  159. ECHO the boot sequence in CMOS.  The hardware documentation that
  160. ECHO came with your computer should discuss how to access this area.
  161. ECHO Ensure that the sequence is A: first THEN C:.
  162. ECHO .
  163. ECHO It is also possible that you have a hard drive controller that
  164. ECHO is placing an IMAGE of the infected Boot Record into memory.
  165. ECHO If this is the case then the virus may not be active and could
  166. ECHO possibly be removed.
  167. A:\GETREPLY.EXE Would you like to attempt anyway (Y/N)? ;yn
  168. IF ERRORLEVEL 2 GOTO Exit
  169. GOTO ScanNOMEM
  170.  
  171. :BadClean
  172. REM ******************************************************************
  173. REM *** errorlevel 12
  174. REM ******************************************************************
  175. CLS
  176. ECHO A problem has occurred in trying to clean a virus. Either the
  177. ECHO CLEAN.DAT file is missing or corrupted or VirusScan was unable to
  178. ECHO clean the virus. Please check this diskette with the Validate
  179. ECHO program included to make sure the files are all there and are not
  180. ECHO corrupted. If the files are ok, please cold boot the machine with
  181. ECHO this diskette and try the scan again. If the file will still not
  182. ECHO clean, you will need to delete them.
  183. ECHO The Packing.lst will now be displayed for you to compare the values
  184. ECHO from the Validate program. To use Validate, just type:
  185. ECHO VALIDATE {filename} and check the codes versus the Packing.lst
  186. PAUSE
  187. TYPE PACKING.LST
  188. GOTO Exit
  189.  
  190. :VirusFound
  191. REM ******************************************************************
  192. REM *** errorlevels 13 and 19
  193. REM ******************************************************************
  194. CLS
  195. ECHO    W       A       R       N       I       N       G
  196. ECHO .
  197. ECHO One or more viruses were found on this computer. In many cases the
  198. ECHO viruses were cleaned at the same time by the program. It is
  199. ECHO recommended that you cold boot this machine with this disk again
  200. ECHO and have it run another scan to insure that the computer is clean
  201. ECHO and no viruses were missed or were not cleaned.
  202. GOTO Exit
  203.  
  204. :Update
  205. REM ******************************************************************
  206. REM *** errorlevel 14
  207. REM ******************************************************************
  208. CLS
  209. ECHO You're virus data files are getting old and you should update them
  210. ECHO This is not a major problem. However, there may be viruses on this
  211. ECHO machine that are not detectable by this version of the software.
  212. ECHO By updating your software you are getting the most protection
  213. ECHO possible. Please consult your manual for update information.
  214. GOTO Exit
  215.  
  216. :BadscanEXE
  217. REM ******************************************************************
  218. REM *** errorlevel 15
  219. REM ******************************************************************
  220. CLS
  221. ECHO The self-check has failed.  This may be caused by a damaged or 
  222. ECHO modified SCAN.EXE file or problem with the floppy drive. First at 
  223. ECHO the A:> prompt run VALIDATE SCAN.EXE and verify the validation code 
  224. ECHO against the code in the PACKING.LST file.  The PACKING.LST file will
  225. ECHO be displayed on exit.
  226. PAUSE
  227. GOTO AbortSLFCHK
  228.  
  229. :NoTarget
  230. REM ******************************************************************
  231. REM *** errorlevel 17:  Possible encrypting virus
  232. REM ******************************************************************
  233. IF %ERROR17%==1 GOTO EncManualRemove
  234. CLS
  235. ECHO Scan has reported that there is no target specified for scanning.
  236. ECHO This could be due to an encrypting virus or a possible hardware
  237. ECHO issue.  Another scan will be attempted to remedy the situation.
  238. ECHO Please stand by...
  239. GOTO ScanCDrive
  240.  
  241. :ErrorDOS
  242. REM ******************************************************************
  243. REM *** DOS Error
  244. REM ******************************************************************
  245. CLS
  246. ECHO A DOS error has occurred.  Please consult your DOS manual for 
  247. ECHO details or contact your DOS vendor for assistance.
  248. GOTO Exit
  249.  
  250.  
  251. REM ******************************************************************
  252. REM ****  AUXILLARY PROCEDURES
  253. REM ******************************************************************
  254.  
  255.  
  256. :AbortSLFCHK
  257. REM ******************************************************************
  258. REM self check failed
  259. REM ******************************************************************
  260. CLS
  261. TYPE PACKING.LST
  262. GOTO Exit
  263.  
  264. :NoCyclePwr
  265. REM ******************************************************************
  266. REM user said that he did not cycle the power off
  267. REM ******************************************************************
  268. CLS
  269. ECHO It is strongly recommended that you leave this diskette in the
  270. ECHO A: drive and turn the power to the computer off and then on.  Some
  271. ECHO viruses are capable of surviving a warm boot or CTRL+ALT+DEL.
  272. GOTO Exit
  273.  
  274. :ScanNOMEM
  275. REM ******************************************************************
  276. REM *****  ATTEMPT TO BYPASS MEMORY SCAN
  277. REM ******************************************************************
  278. CLS
  279. ECHO If no virus is found on the hard drive(s) then most likely the
  280. ECHO virus is active and it is a stealth type virus.  If a virus is
  281. ECHO is found it is recommended that you boot to this diskette a second
  282. ECHO time to ensure that it is removed.
  283. SET ERROR10=1
  284. SCAN /ADL /CLEAN /ALL /NOMEM /NOBREAK
  285. GOTO DoErrors
  286.  
  287. :ScanCDrive
  288. REM ******************************************************************
  289. REM ***  Run scan on only the C: drive
  290. REM ******************************************************************
  291. SET ERROR17=1
  292. SCAN C: /CLEAN /NOBREAK
  293. GOTO DoErrors
  294.  
  295. :EncManualRemove
  296. REM ******************************************************************
  297. REM *** The Scan C: /CLEAN didn't work
  298. REM ******************************************************************
  299. CLS
  300. ECHO The same error has occurred again.  If this is due to a virus you
  301. ECHO may need to perform a manual removal in this case.  It is also
  302. ECHO possible that you are experiencing some hardware issues. Try running
  303. ECHO a disk diagnostic program to see if it can clear up the problem.
  304. GOTO Exit
  305.  
  306. :ExitNoMem
  307. REM ******************************************************************
  308. REM *****  EXIT AFTER USING NOMEM AND VIRUS WAS FOUND PREVIOUSLY
  309. REM ******************************************************************
  310. CLS
  311. ECHO Scan did not find a virus on the second pass. However, because a 
  312. ECHO virus was found in memory it is possible that there is still a 
  313. ECHO virus active on the hard drive.  Again, it is unlikely that this 
  314. ECHO disk is infected as long as the write protect tab on the was 
  315. ECHO diskette was never bypassed. There are other possibilities. 
  316. ECHO You should check the boot sequence in CMOS.  The hardware 
  317. ECHO documentation that came with your computer should discuss how to 
  318. ECHO access this area. Ensure that the sequence is A: first THEN C:
  319. ECHO Try cold booting your system again using this diskette and run
  320. ECHO another scan. If a virus continues to show up in memory, then 
  321. ECHO there may be a compatibility issue with some hardware in the
  322. ECHO computer.
  323. GOTO Exit
  324.  
  325.  
  326. :Exit
  327. echo exit
  328.  
  329.  
  330.