Ohmnivore

My portable cleanup suite


UPDATE

Bundled (midway between open-source and freeware) version here: https://github.com/Ohmnivore/FPCS


Over the past few weeks I’ve found myself doing the same stuff over and over again. Run JRT.exe, run Malwarebytes, run this, run that. All that is of course time-consuming.

This week-end I went to my grandma’s place and I ran the usual stuff. My grandma always ends up with some shady toolbars and whatnot so there’s always work to do when I’m there. Of course I can’t always be there, so I came up with a solution that will allow my grandma to clean up her computer by herself.

So, I proudly present my portable cleanup suite (PCS)!

Disclaimer: this might or might not save your computer if it’s terribly infected. Personally, I’d use something else if heavy artillery is needed. This is meant as a periodic cleanup utility that doesn’t require you to watch over it. Just open and leave. There’s noob-friendly instructions as well.

Of course I didn’t write an anti-virus, a defragment utility, a disc cleanup, and a remover of shitty software. As of now I am using Piriform’s CCleaner and Defraggler, along with VIPRE AV, and the awesome Junk Removal Tool by Thisisu. These are proprietary software, so I can’t package it and share it. I’m now looking for open-source alternatives, but I’ll share the script nevertheless. It should be saved as  a .bat file.

Proprietary version below

Required folder structure

Folder PATH listing  
Volume serial number is 52EE-DF20  
C:\USERS\OHMNIVORE\DESKTOP\PORTABLE SECURITY SUITE  
 -CCleaner.exe  
 -Clean.bat  
 -df.exe  
 -JRT.exe  
 \—VIPRE  
 +—Definitions  
 +—Quarantine  
 \—x64

Where to get

CCleaner.exe

Clean.bat is the code right below

df.exe

JRT.exe

VIPRE folder – extract, rename, move to match the expected directory structure

@echo off
TITLE Portable Cleanup Suite by Ohmnivore

call :ColorText 0b "No guarantees, bla, bla, bla, etc, etc"  
ECHO(  
call :sleep 4

goto main

:main
copy /y NUL ClamWinLog.txt >NUL  
call :Info "Green text stands for INFORMATION."  
call :Instr "Red text stands for INSTRUCTIONS."  
call :sleep 5  
ECHO(

call :Instr "NOTE that browsers will close"  
call :Instr "during this process. Make sure"  
call :Instr "you saved anything important."  
call :sleep 10  
ECHO(

call :Info "Running CCleaner Registry by Piriform"  
call :Instr "Press 'Scan for Issues'near the bottom of the window."  
call :Instr "Once the scan is done, press 'Fix Selected Issues'."  
call :Instr "If you want, backup the registry"  
call :Instr "by clicking 'Yes' and then 'Save'."  
call :Instr "Another window will appear. Click 'Fix All Selected Issues'."  
call :Instr "Now close CCleaner."  
Echo(  
"%~dp0CCleaner.exe"/REGISTRY

call :Info "Running Junk Removal Tool by Thisisu"  
call :Instr "Select the JRT.exe window and hit Enter"  
call :Instr "to continue with the process"  
Echo(  
start "" "%~dp0JRT.exe"  
call :sleep 20

call :Instr "From now on all the clean up process"  
call :Instr "will be automatic"  
Echo(

call :Info "Running CCleaner auto cleaning by Piriform"  
Echo(  
"%~dp0CCleaner.exe"/AUTO

call :Info "Running VIPRE portable"  
Echo(  
cd %~dp0VIPRE\  
start /WAIT "" "%~dp0VIPRE\VipreRescueScanner.exe"

call :Info "Running Defraggler portable by Piriform"  
Echo(  
start /WAIT "" "%~dp0df.exe" C: /QD

call :Info "Done. Finished. Haha."  
Echo(

REM call :Info "Running ClamWin portable"  
REM Echo(  
REM "%~dp0ClamWinPortable\App\clamwin\bin\clamscan.exe" -i --log="ClamWinLog.txt" --show-progress

:sleep Seconds
ping -n %~1 127.0.0.1 > nul

:Instr %1=Str
call :ColorText 0c %1  
ECHO(  
exit /b

:Info %1=Str
call :ColorText 0a %1  
ECHO(  
exit /b

:ColorText Color String
:: http://stackoverflow.com/questions/2586012/how-to-change-the-text-color-of-comments-line-in-a-batch-file
:: Prints String in color specified by Color.
::
::   Color should be 2 hex digits
::     The 1st digit specifies the background
::     The 2nd digit specifies the foreground
::     See COLOR /? for more help
::
::   String is the text to print. All quotes will be stripped.
::     The string cannot contain any of the following: * ? < > | : \ /
::     Also, any trailing . or <space> will be stripped.
::
::   The string is printed to the screen without issuing a <newline>,
::   so multiple colors can appear on one line. To terminate the line
::   without printing anything, use the ECHO( command.
::
setlocal  
pushd %temp%  
for /F "tokens=1 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (  
  <nul set/p"=%%a" >"%~2"
)
findstr /v /a:%1 /R "^$" "%~2" nul  
del "%~2" > nul 2>&1  
popd  
exit /b