e01

Anti-virus BATCH

e01
May 27th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 19.80 KB | None | 0 0
  1. @echo off
  2. goto nodebug
  3.  
  4. :: @@@@@ Below Block is for Debugging Purposes Only @@@@@
  5. @echo on
  6. echo ERROR TEST LOG FLAG
  7. IF NOT %1!==/go! %0 /go 1>C:\state\%~n0.log 2>&1
  8. SHIFT
  9.  
  10. ECHO %1 %2 %3 %4 %5
  11.  
  12. :: @@@@@ Above Block is for Debugging Purposes Only @@@@@@
  13. :nodebug
  14. :: :::::::::::::::::::::::::::::::::::::::
  15. :: Automatically check & get admin rights
  16. :: :::::::::::::::::::::::::::::::::::::::
  17. :: http://stackoverflow.com/questions/...
  18. echo Hello Computer Name: %computername%
  19. echo.
  20. ECHO.
  21. ECHO =============================
  22. ECHO Running Admin shell
  23. ECHO =============================
  24.  
  25. :checkPrivileges
  26. NET FILE 1>NUL 2>NUL
  27. if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
  28.  
  29. :getPrivileges
  30. if '%1'=='ELEV' (shift & goto gotPrivileges)
  31. ECHO.
  32. ECHO **************************************
  33. ECHO Invoking UAC for Privilege Escalation
  34. ECHO **************************************
  35. setlocal DisableDelayedExpansion
  36. set "batchPath=%~0"
  37. setlocal EnableDelayedExpansion
  38. ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
  39. ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
  40. "%temp%\OEgetPrivileges.vbs"
  41. exit /B
  42.  
  43. echo Current path is %cd%
  44. echo Changing directory to the path of the current script
  45. cd %~dp0
  46. echo Current path is %cd%
  47.  
  48. :gotPrivileges
  49. ::::::::::::::::::::::::::::
  50. ::START
  51. :: @@@@@@@@@@@@ DEEP OR QUICK MODE SELECTION BELOW @@@@@@@@@@@@
  52. @For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
  53. Set Day=%%A
  54. Set Month=%%B
  55. Set Year=%%C
  56. )
  57.  
  58. echo -------------------------------------------------
  59. echo %Year%-%Month%-%Day%
  60. echo.
  61. set choice=n
  62. echo -------------------------------------------------
  63. echo Do you want to RUN Manual Deep Scans ALSO ? Press: y : then : ENTER.
  64. echo.
  65. echo NOTE: Some of these deep scans can take a long time to complete ...
  66. echo You should only run the DEEP scans about once a month to save time...
  67. echo OR If you KNOW their is a problem with your computer and it needs fixing.
  68. echo.
  69. echo If you Want FULL Automation and DO NOT want to
  70. echo be bothered with DEEP Manual Scans JUST Press Enter.
  71. echo -------------------------------------------------
  72. set /P choice=: [y] or [n] ^>
  73. echo.
  74. echo You Pressed The: %choice% Key
  75. :: Check and MAKE SURE an Invalid Key was not pressed if so set n
  76. if not %choice%==y if not %choice%==n set choice=n
  77. echo.
  78. :: @@@@@@@@@@@@ DEEP OR QUICK MODE SELECTION ABOVE @@@@@@@@@@@@
  79. :: The User Selection Options y or n are taken into consideration
  80. :: further down the script in various selected regions.
  81. :: ------------------------------------------------------------
  82. :: This Sets a TIME SLOT of FULL scan mode on EMSISOFT if ALL true
  83. if %choice%==y (set scanmode=deep) else (set scanmode=smart)
  84. echo -----------------------------------------------------------
  85. echo This AUTOMATED batch cleaning tool was written by e01 @AccessPwned 2018
  86. echo It can ONLY work if you have several programs Installed
  87. echo Including SPYBOT SEARCH AND DESTROY. Including the Following !
  88. echo Malwarebytes : Emsisoft : Defraggler : CCleaner :
  89. echo IF some or ALL of these programs are missing or not Installed
  90. echo in their USUAL C:\Program Files Location then this Batch
  91. echo file MAY not be effective in AUTOCLEANING your system,
  92. echo if you have any problems please contact Chelley
  93. echo.
  94. echo THIS BATCH MUST BE STARTED VIA RUNNING: RUNME.bat AS an ADMINISTRATOR
  95. echo -----------------------------------------------------------
  96. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  97. if not exist "%SystemRoot%\System32\Contig.exe" if exist "Contig.exe" xcopy /y Contig.exe "%SystemRoot%\System32\Contig.exe"
  98. cls
  99. :: ###########################################################
  100. > cleaning.tmp echo Running
  101. set state="C:\state\clnstate.txt"
  102. if not exist C:\state\ md C:\state\
  103. >> %state% echo.
  104. >> %state% echo STARTING NEW SCAN ON Time: %time% Date: %date%
  105. >> %state% echo ----------------------------------------
  106. :: http://www.makeuseof.com/tag/xx-way...
  107. :: ###########################################################
  108. :: https://helpdesk.malwarebytes.org/h...
  109. if exist "C:\Program Files\Malwarebytes Anti-Malware\mbam.exe" (set mbytes=11) else (set mbytes=10)
  110. if exist "C:\Program Files\Malwarebytes Anti-Malware\mbam.exe" (set mbaU="C:\Program Files\Malwarebytes Anti-Malware\mbam.exe" /runupdate) else (set mbaU=>> %state% echo Malware Bytes is Not Installed or path LOCATION ERROR on %date%)
  111. if exist "C:\Program Files\Malwarebytes Anti-Malware\mbam.exe" (set mbaS="C:\Program Files\Malwarebytes Anti-Malware\mbam.exe" /fullauto) else (set mbaS=echo none)
  112. if exist "C:\Program Files\Defraggler\df.exe" (set def="C:\Program Files\Defraggler\df") else (set def=%SystemRoot%\system32\Defrag)
  113. if exist "C:\Program Files\CCleaner\CCleaner.exe" (set cc=1) else (set cc=10)
  114. if exist "C:\Program Files\CCleaner\CCleaner.exe" (set ccscf="C:\Program Files\CCleaner\CCleaner.exe" /AUTO) else (set ccscf=>> %state% echo CCleaner is Not Installed or path LOCATION ERROR on %date%)
  115. if exist "C:\Program Files\CCleaner\CCleaner.exe" (set ccscr="C:\Program Files\CCleaner\CCleaner.exe" /REGISTRY /AUTO) else (set ccscr=echo none)
  116. if exist "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" (set spb=1) else (set spb=10)
  117. if exist "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" (set spybot1="C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" /autoupdate /autoimmunize /autocheck /autofix /autoclose) else (set spybot1=>> %state% echo Spybot Search and Destroy is Not Installed or path LOCATION ERROR on %date%)
  118. if exist "C:\Program Files\Emsisoft Anti-Malware\a2cmd.exe" (set a2c=1) else (set a2c=10)
  119. if exist "C:\Program Files\Emsisoft Anti-Malware\a2cmd.exe" (set amalu="C:\Program Files\Emsisoft Anti-Malware\a2cmd.exe" /s /update &&echo UPDATED Emsisoft &&if exist sleep.com sleep 5) else (set amalu=>> %state% echo Emsisoft Antimalware is Not Installed or path LOCATION ERROR on %date%)
  120. if exist "C:\Program Files\Emsisoft Anti-Malware\a2cmd.exe" (set amals="C:\Program Files\Emsisoft Anti-Malware\a2cmd.exe" /s /%scanmode% /h /m /t /r /d /whitelist="C:\Program Files\Emsisoft Anti-Malware\a2whitelist.ini" /quarantine="C:\Program Files\Emsisoft Anti-Malware\Quarantine" /delete) else (set amals=echo none)
  121. if %mbytes%==11 echo Updating MalwareBytes &&%mbaU%
  122. :: http://www.safer-networking.org/faq...
  123. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  124. :: SPYBOT SEARCH AND DESTROY LOG SNOOPING LOOKING FOR SPYWARE START
  125. :: ---------------------------------------------------
  126. if exist "%ALLUSERSPROFILE%\Application Data\Spybot - Search & Destroy\Logs" set splogs="%ALLUSERSPROFILE%\Application Data\Spybot - Search & Destroy\Logs\Checks.*%Month%%Day%-*.log"
  127. set spiesfound=0
  128. if exist %splogs% (goto check1a) else (goto nochk1a)
  129. :check1a
  130. >nul find "found:" %splogs% && (
  131. echo Spybot has found Spyware on %computername%.
  132. set spiesfound=1
  133. goto :notice2
  134. ) || (
  135. echo Spybot has found no Spyware on %computername%.
  136. goto :nofix2
  137. )
  138.  
  139. if %spiesfound%==1 echo SPYWARE WAS FOUND BY SPYBOT SEARCH AND DESTROY.
  140. if %spiesfound%==1 >> %state% echo SPYWARE WAS FOUND BY SPYBOT SEARCH AND DESTROY T:%time D:%date%
  141. :nochk1a
  142. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  143. :: SPYBOT SEARCH AND DESTROY LOG SNOOPING LOOKING FOR SPYWARE END
  144. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  145. >> %state% echo Operating System = Windows %os%
  146. >> %state% echo --------------------------------------------------------------------------------
  147. >> %state% echo.
  148. >> %state% echo NEW SCAN INITIALIZED FOR CLEANING AND DEFRAG AT %time% on %date%
  149. if %a2c%==10 >> %state% echo Emsisoft Antimalware Is Missing Please Instal http://tinyurl.com/knd5aod
  150. if %mbytes%==10 >> %state% echo MalwareBytes is Not Installed Will try Portable Version OR Please Install from https://www.malwarebytes.org/
  151. if %cc%==10 >> %state% echo Ccleaner is Missing Please Install http://www.piriform.com/
  152. if %spb%==10 >> %state% echo Spybot Search and Destroy is Missing Please Install http://www.safer-networking.org/
  153. if %Day%==8 Cleanmgr /sagerun:1
  154. if %Day%==22 Cleanmgr /sagerun:1
  155. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  156. cls
  157. :: ------------------------------------------------------
  158. >> %state% echo CLEANING YOUR SYSTEM T: %time% D: %date%
  159. if %a2c%==1 echo Updating Emsisoft &&%amalu%
  160. echo.&&cls
  161. echo DONE Emsisoft Update
  162. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  163. cls
  164. :: ------------------------------------------------------
  165. if %cc%==1 echo Running Ccleaner File Clean &&%ccscf%
  166. echo.&&cls
  167. if %cc%==1 echo DONE Ccleaner File Clean
  168. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  169. cls
  170. :: ------------------------------------------------------
  171. if %cc%==1 echo Running Ccleaner Reg Clean &&%ccscr%
  172. echo.&&cls
  173. if %cc%==1 echo DONE Ccleaner Registry Clean
  174. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  175. cls
  176. if %choice%==n goto donesbsd
  177. if %spb%==10 goto donesbsd
  178. :: ---------- Prevents Repeat Checks Same Month ---------
  179. set noloop2=0
  180. if exist Month2.tmp set /p noloop2=<Month2.tmp
  181. if %noloop2% NEQ %Month% goto spsdr
  182. if %noloop2% EQU %Month% echo SPYBOT Search 8 Destroy HAS ALREADY RUN ONCE THIS Month
  183. if %noloop2% EQU %Month% >> %state% echo SPYBOT Search 8 Destroy HAS ALREADY RUN ONCE THIS Month %Month%
  184. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  185. if %noloop2%==%Month% goto donesbsd
  186. :: ------------------------------------------------------
  187. :spsdr
  188. > Month2.tmp echo %Month%
  189. if %choice%==y echo Running Spybot Search and Destroy Please Wait ... &&%spybot1%
  190. echo.&&cls
  191. if %choice%==y echo DONE Spybot Search and Destroy Scan &&goto donesbsd
  192. cls
  193. :: ------------------------------------------------------
  194. if %Day%==21 echo Running Spybot Search and Destroy &&%spybot1%
  195. if %Day%==21 echo DONE Spybot Search and Destroy Scan
  196. :donesbsd
  197. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  198. cls
  199. :: ------------------------------------------------------
  200. if %mbytes%==11 if %choice%==y echo Running MalwareBytes Antimalware &&%mbaS%
  201. echo.&&cls
  202. if %mbytes%==11 if %choice%==y echo Done MalwareBytes Antimalware
  203. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  204. cls
  205. :: ------------------------------------------------------
  206. if %a2c%==1 echo Emsisoft Antimalware Scanning &&%amals%
  207. echo.&&cls
  208. if %a2c%==1 echo Completed Emsisoft Antimalware Scan.
  209. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  210. cls
  211. set malfound=0
  212. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  213. :: @@@@@@@@@@@@@@@@@@@@ OPTIONAL @@@@@@@@@@@@@@@@@@@@@@@@
  214. :: ------------------------------------------------------
  215. :: If in "mbar-log-*.txt" a "Removal queue found" or "Cleaning up" or "Infected" then run fixdamage
  216. if exist Mbar\mbar.exe (goto mbar1) else (goto nofix)
  217. :mbar1
  218. :: ----------------------------------------------------------------
  219. echo.
  220. echo.
  221. :: If all the scanners did a DEEP scan all at once it could take 24 Hours
  222. :: to complete so these Variables below check to ensure only one scanner at
  223. :: a time gets to run in deep scan mode to save time.
  224. :: also if Malwarebytes is already installed skip portable MBAR version.
  225. :: ----------------------------------------------------------------
  226. if %mbytes%==11 goto nocheck1
  227. if %scanmode%==deep goto nocheck1
  228. if %choice%==n goto nocheck1
  229. echo -------------------------------------------------
  230. echo PLEASE LEAVE THIS WINDOW OPEN or BEHIND an Active Scan Window
  231. echo as you may have to read further scan results or Input [y] or [n]
  232. echo.
  233. echo STARTING PORTABLE VERSION OF MALWAREBYTES MBAR
  234. echo Starting Mbar Scanner Please Wait ....
  235. echo.
  236. if exist Mbar\mbar.exe call Mbar\mbar.exe
  237. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  238. cd %1
  239. cls
  240. if exist "Mbar\Plugins\fixdamage.exe" (goto fixdamage) else (goto nofix)
  241.  
  242. echo --------------------------------------------------------------
  243. :fixdamage
  244. echo PRESS PAUSE BREAK KEY TO READ TEXT BELOW : PRESS SPACE BAR TO CONTINUE
  245. echo.
  246. echo --------------------------------------------------------------
  247. if exist Mbar\mbar-log-%year%-%Month%-%Day%*.txt (goto :check1) else (goto :nocheck1)
  248. :check1
  249. >nul find "Infected" Mbar\mbar-log-%year%-%Month%-%Day%*.txt && (
  250. echo MBAR has found A Virus on %computername%.
  251. set malfound=1
  252. goto :notice
  253. ) || (
  254. echo Mbar has found no Infection on %computername%.
  255. goto :nofix
  256. )
  257.  
  258. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  259. :notice
  260. echo.
  261. echo Selecting fixdamage will open another console window and request
  262. echo confirmation to apply any fixes to %computername%. Input: Y
  263. echo to begin the fix.
  264. echo.
  265. :nocheck1
  266. echo IMPORTANT If MBAR should ever find an Infection on %computername%
  267. echo You MUST Run the FIX DAMAGE application to repair any Damage
  268. echo A Virus / Trojan Horse / or other Malware may have caused.
  269. echo.
  270. echo However PLEASE NOTE that Running FIXDAMAGE.EXE Unnecesarily
  271. echo may result in losing some user settings, these are not critical but
  272. echo will mean you may have to reconfigure some user preferences again.
  273. echo.
  274. echo.
  275. :nofix
  276. pathping 127.0.0.1 -n -q 1 -p 15000 >nul 2>&1
  277. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  278. echo.
  279. if %spiesfound%==1 if %malfound%==1 echo Multiple Problems were found on your computer Virus's and Spyware
  280. echo.
  281. :: ---------------------------------------------------
  282. >> %state% echo.
  283. if %spiesfound%==1 if %malfound%==1 >> %state% echo Multiple Problems were found on your computer Virus's and Spyware
  284. >> %state% echo.
  285. :: @@@@@@@@@@@@@@@@@@@@ OPTIONAL @@@@@@@@@@@@@@@@@@@@@@@@
  286. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  287. echo Now Defragmenting YOUR HARD DRIVE
  288. >> %state% echo DEFRAGMENTING YOUR SYSTEM T: %time% D: %date%
  289. %def% C:
  290. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  291. if exist "D:\"* (set drvexist01=1) else (set drvexist01=0)
  292. if exist "E:\"* (set drvexist02=1) else (set drvexist02=0)
  293. if exist "F:\"* (set drvexist03=1) else (set drvexist03=0)
  294. if exist "G:\"* (set drvexist04=1) else (set drvexist04=0)
  295. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  296. :: -----------------------
  297. if "%drvexist01%"=="0" goto noD
  298. echo.
  299. echo Now Checking Defrag Schedule for D: Drive
  300. echo.
  301. if %Day%==2 %def% D:
  302. if %Day%==5 %def% D:
  303. if %Day%==10 %def% D:
  304. if %Day%==28 %def% D:
  305. :: -----------------------
  306. :noD
  307. if "%drvexist02%"=="0" goto noE
  308. echo.
  309. echo Now Checking Defrag Schedule for E: Drive
  310. echo.
  311. if %Day%==3 %def% E:
  312. if %Day%==12 %def% E:
  313. :: -----------------------
  314. :noE
  315. if "%drvexist03%"=="0" goto noF
  316. echo.
  317. echo Now Checking Defrag Schedule for F: Drive
  318. echo.
  319. if %Day%==4 %def% F:
  320. if %Day%==26 %def% F:
  321. :: -----------------------
  322. :noF
  323. if "%drvexist03%"=="0" goto noG
  324. echo.
  325. echo Now Checking Defrag Schedule for G: Drive
  326. echo.
  327. if %Day%==25 %def% G:
  328. :: -----------------------
  329. :noG
  330. :: @@@@@@@@@@@@@@@@@
  331. :: CHECK DISK FOR ERRORS chkdsk
  332. if %Day% GTR 25 if %Day% LSS 27 goto chk
  333. if %Day% GTR 10 if %Day% LSS 14 goto chk
  334. if %Day% LSS 03 goto chk
  335. goto nochk
  336. :chk
  337. set noloop1=0
  338. if exist today1.tmp set /p noloop1=<today1.tmp
  339. if %noloop1%==%Day% echo HARD DISKS HAVE ALREADY BEEN CHECKED ONCE TODAY
  340. >> %state% echo HARD DISKS HAVE ALREADY BEEN CHECKED ONCE TODAY %date%
  341. if %noloop1%==%Day% goto nochk
  342. > today1.tmp echo %Day%
  343. >> %state% echo Now CHECKING YOUR HARD DRIVE
  344. echo Now CHECKING YOUR HARD DRIVE
  345. echo y > confirm.txt
  346. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  347. :: -----------------------
  348. if "%drvexist01%"=="0" goto noD1
  349. echo Checking Drive D: For Errors
  350. echo.
  351. cls
  352. >> %state% echo Checking Drive D: For Errors
  353. >> %state% echo.
  354. chkdsk D: /F < confirm.txt
  355. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  356. :noD1
  357.  
  358. if "%drvexist02%"=="0" goto noE1
  359. echo Checking Drive E: For Errors
  360. echo.
  361. cls
  362. >> %state% echo Checking Drive E: For Errors
  363. >> %state% echo.
  364. chkdsk E: /F < confirm.txt
  365. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  366. :noE1
  367.  
  368. :: -----------------------
  369. if "%drvexist03%"=="0" goto noF1
  370. echo Checking Drive F: For Errors
  371. echo.
  372. cls
  373. >> %state% echo Checking Drive F: For Errors
  374. >> %state% echo.
  375. chkdsk F: /F < confirm.txt
  376. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  377. :noF1
  378.  
  379. :: -----------------------
  380. if "%drvexist04%"=="0" goto noG1
  381. echo Checking Drive G: For Errors
  382. echo.
  383. cls
  384. >> %state% echo Checking Drive G: For Errors
  385. >> %state% echo.
  386. chkdsk G: /F < confirm.txt
  387. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  388. :noG1
  389.  
  390. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  391. echo Checking Drive C: For Errors
  392. echo.
  393. >> %state% echo Checking Drive C: For Errors
  394. >> %state% echo.
  395. chkdsk C: /F < confirm.txt
  396. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  397. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  398. :nochk
  399. if %malfound%==0 goto nomrt
  400. echo BECAUSE A VIRUS WAS DETECTED A FULL MICROSOFT
  401. echo M.R.T. MUST BE RUN this Can take some time,
  402. echo IT SHOULD BE ALLOWED TO BE COMPLETED.
  403. :nomrt
  404. if %spiesfound%==1 if %malfound%==1 goto malrem
  405. if %choice%==n goto nomalrem
  406. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  407. if exist "malremove.exe" goto malrem
  408. goto nomalrem
  409. :malrem
  410. echo Running Microsoft Malacious Software Removal Tool Time: %time%
  411. >> %state% echo PLEASE Un-Check The Check Box to ASK for Permission Time: %time% Date: %date%
  412. >> %state% echo should it be displayed.
  413. echo.
  414. echo Please WAIT This can Take quite a long time this Scan is Only run
  415. echo If other virus Detections have been confirmed during earlier scans.
  416. echo.
  417. echo ----------------------------------------
  418. if %spiesfound%==1 if %malfound%==1 goto mrtcln
  419. echo skipping M.R.T. On this occasion I'm feeling lazy
  420. >> %state% echo ----------------------------------------
  421. >> %state% echo skipping M.R.T. On this occasion
  422. >> %state% echo as no virus to cleanup
  423. >> %state% echo ----------------------------------------
  424. goto skipmrt
  425. :mrtcln
  426. echo PLEASE select CONTINUE and DE-SELECT The Check Box
  427. echo for "M.S. Malacious Software Removal Tool"
  428. echo IF it should ask for your permission to run ....
  429. echo should it be displayed..
  430. echo.
  431. malremove.exe /Q /F:Y
  432. :skipmrt
  433. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  434. cls
  435. :nomalrem
  436. :: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  437.  
  438. if not exist "%SystemRoot%\System32\Contig.exe" goto nocontig
  439. >> %state% echo Starting CONTIG this program defragments system files
  440. >> %state% echo including the paging file and Multi Fat Table etc.
  441. >> %state% echo.
  442.  
  443. echo Starting CONTIG this program defragments system files
  444. echo including the paging file and Multi Fat Table.
  445. echo.
  446.  
  447. >> %state% echo ----------------------------------------
  448.  
  449. contig $Mft
  450. contig $LogFile
  451. contig $Volume
  452. contig $AttrDef
  453. contig $Bitmap
  454. contig $Boot
  455. contig $BadClus
  456. contig $Secure
  457. contig $UpCase
  458. contig $Extend
  459.  
  460. >> %state% echo ----------------------------------------
  461. >> %state% echo.
  462. pathping 127.0.0.1 -n -q 1 -p 19000 >nul 2>&1
  463. cls
  464. :: ::::::::::::::::::::::::::
  465. :nocontig
  466. echo Please Scroll Down for any Software errors
  467. echo When NOTEPAD opens the LOG FILE to read batch log
  468. echo and send to chelley if their are errors listed.
  469. echo.
  470. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  471. notepad %state%
  472. del cleaning.tmp
  473.  
  474. if %malfound%==0 goto nowarn
  475. >> %state% echo MALWARE OR A VIRUS WAS FOUND
  476. >> %state% echo YOU MAY WISH TO DO FURTHER
  477. >> %state% echo DEEP SCANS ON YOUR COMPUTER.
  478. :nowarn
  479. >> %state% echo.
  480. >> %state% echo Clean5.bat Completed Successfully Date: %date% Time: %time%
  481. echo Clean5.bat Completed Successfully %time%
  482. :: ------------------------------------------
  483. :: --------- BELOW COMMAND DISABLED ---------
  484. :: echo COMPUTER WILL SHUTDOWN IN 10 MINUTES TIME
  485. :: shutdown -i -s -t 600
  486. :: ------------------------------------------
  487. :: ::::::::::::::::::::::::::
  488. setlocal & pushd .
  489.  
  490. echo Current path is %cd%
  491. echo Changing directory to the path of the current script
  492. cd %~dp0
  493. echo Current path is %cd%
  494.  
  495. REM Run shell as admin (example) - put here code as you like
  496. >> %state% echo %choice% Key
  497. >> %state% echo You Pressed The: %choice% Key y = full n = quick
  498. >> %state% echo Completed
  499. >> %state% echo.
  500. >> %state% echo ----------------------------------------
  501. pathping 127.0.0.1 -n -q 1 -p 5000 >nul 2>&1
  502. :: cmd /k
  503. endlocal
Add Comment
Please, Sign In to add comment