Overclock.net banner

1 - 6 of 6 Posts

·
Registered
Joined
·
1,199 Posts
Discussion Starter · #1 ·
After the latest issue with CCleaner 5, and I know it has always corrupted my search index, I stopped using it and created my own batch file to clean the following folders. I don't trust anything that comes from Priform anymore!

I don't trust any utility any more to tinker with my system files or registry

Some problems to be wary of:

Event ID 80

CCleaner 5.01.0575 corrupted my SSD 01/01/2015

All my files are now corrupted...

sxs event id 78

Windows Event Viewer Error 78
======================================================

Temp Files Cleanup:
  • Cleans up the Temp folder in the C:\Windows\Temp
  • Cleans up the C:\Users\yourusername\Temp
  • Cleans up the Software Distribution folder where all the Windows updates are downloaded, but after they are installed, Windows doesn't delete them and they are no longer needed. Only run the file after you have rebooted if you installed Windows updates

To create the batch file, simply open a notepad, then paste the below text, then name it "Temp Files Cleanup.bat"

DEL /S /F /Q "%temp%\*" 1>nul 2>nul
DEL /S /F /Q %systemroot%\temp\* 1>nul 2>nul
DEL /S /F /Q %systemroot%\SoftwareDistribution\Download\* 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad "%temp%"" 2^>nul') do RD /S /Q %%i 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad %windir%\temp" 2^>nul') do RD /S /Q %%i 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad %windir%\SoftwareDistribution\Download" 2^>nul') do RD /S /Q %%i 1>nul 2>nul


===========================================

System Files Cleanup:

Cleans up all the above mentioned folder in addition to some extras like the system logs, .NET Framework temp files, etc.
To create the batch file, simply open a notepad, then paste the below text, then name it "System Cleanup.bat"

@echo off
title .
color 1F
openfiles >nul 2>&1
if %errorlevel% NEQ 0 goto :UACPrompt
goto :gotAdmin
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~fs0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /b
:gotAdmin
DEL /S /F /Q "%temp%\*" 1>nul 2>nul
DEL /S /F /Q %systemroot%\temp\* 1>nul 2>nul
DEL /S /F /Q %systemroot%\inf\*.log 1>nul 2>nul
DEL /S /F /Q %systemroot%\Logs\CBS\* 1>nul 2>nul
DEL /S /F /Q %systemroot%\Logs\DPX\* 1>nul 2>nul
DEL /S /F /Q %systemroot%\Logs\DISM\* 1>nul 2>nul
DEL /S /F /Q %systemroot%\Microsoft.NET\Framework\v2.0.50727\*.log 1>nul 2>nul
DEL /S /F /Q %systemroot%\Microsoft.NET\Framework\v4.0.30319\*.log 1>nul 2>nul
if exist %systemroot%\SysWOW64\cmd.exe DEL /S /F /Q %systemroot%\Microsoft.NET\Framework64\v2.0.50727\*.log 1>nul 2>nul
if exist %systemroot%\SysWOW64\cmd.exe DEL /S /F /Q %systemroot%\Microsoft.NET\Framework64\v4.0.30319\*.log 1>nul 2>nul
DEL /S /F /Q %systemroot%\SoftwareDistribution\Download\* 1>nul 2>nul
RD /S /Q "%LocalAppData%\Microsoft\Windows\WER\ReportQueue" 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad "%temp%"" 2^>nul') do RD /S /Q %%i 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad %windir%\SoftwareDistribution\Download" 2^>nul') do RD /S /Q %%i 1>nul 2>nul
for /f %%i in ('"dir /s /b /ad %windir%\temp" 2^>nul') do RD /S /Q %%i 1>nul 2>nul


====================================
I've also uploaded the files if you wanna download them:

Temp Files Cleanup.bat

System Files Cleanup.bat
 
  • Rep+
Reactions: Archea47

·
Premium Member
Joined
·
3,348 Posts
That sucks - I've used CCleaner for a while going back to XP and haven't had this issue, but will definitely be wary now. A few ironic points: 1. it's called CRAP Cleaner 2. "Piriform" means "pear-shaped" which is British lingo for SNAFU.
biggrin.gif
 

·
Registered
Joined
·
402 Posts
Wait... what? How did CCleaner corrupt the SSD? I mean, if it corrupted the OS the OS can be re-installed. But did it actually kill the SSD? As in, did it issue a low-level SATA command that resulted in a bricked SSD?

Honestly, this is one of the reasons why I don't let CCleaner do every stinkin' cleaning option it has. I let it touch my Firefox/Palemoon data, Thunderbird data, and a few other things. But when it comes to system-related data? Not just no, but hell no! And as for Registry Cleaners? Stay away from them as if they're the black plague! Nothing good can come from some program screwing with the Registry. The few items these so-called utilities remove from the Registry won't effect the performance of the Registry one damn bit. Even Microsoft suggests not to go playing in the Registry unless you absolutely know what you're doing.

When it comes to the Registry... LEAVE IT ALONE!
 

·
Not new to overclock.net
Joined
·
1,588 Posts
I was a loyal advanced system care user for a while....can it end up doing the same thing?
 

·
Registered
Joined
·
1,283 Posts
As you've illustrated, temp files can be cleaned up using any number of less comprehensive methods. The registry is one of the areas where I *do* use CCleaner. Installing and uninstalling applications,plug-ins, etc. can leave all kinds of library reference corruption over time in the registry. One thing CCleaner does well (at least for me, anyway) is find invalid or incorrect references in the registry and removes them. This has little to do with performance or disk space. It's more about system stability. Generally in the unlikely event that a problem *does* arise from the cleaning, reinstalling the affected application resolves it. I don't remember the last time anything like that has happened, though. If it causes problem with the OS, then you were likely headed for problems, anyway.
 
1 - 6 of 6 Posts
Top