Introduction: Reverse Engineer Any CleanUp Tool for Optimal Computer Performance

Picture of Reverse Engineer Any CleanUp Tool for Optimal Computer Performance

If you are anything like me, you would like to have and take control over everything on your computer. You ust be able to determine how much storage is used for programs blah blah blah.

Although applications may be useful in getting things done, how about reverse engineering the processes carried out by the application in a script created by yourself to do the exact same job?

So in this tutorial, I am going to show you how to reverse a top clean up tool in a single script to do the exact same job the software is designed to do.

Step 1: Install the Clean Up Tool --> Clean Master

Picture of Install the Clean Up Tool --> Clean Master

For the purposes of this tutorial, I am going to install Clean Master {My chosen cleanup tool}.

Install file can be located here--> Click Here

Step 2: Launch Software and Identify Main Elements

Picture of Launch Software and Identify Main Elements

In this step, you would go ahead to launch the application and note down the main elements. The main categories are under the following;

  1. System Cache
  2. Web Cache
  3. Other Software Junk
  4. Social Software Junk
  5. Video and Audio Junk
  6. Registry Junk
  7. Online Games Junk

Now that you have identified the main categories, go ahead to perform the following steps, check next slide.

Step 3: Forensic Analysis - System Cache

Picture of Forensic Analysis - System Cache

Now that you have identified the main elements, see the category which has more cleanup needed (you wold notice the size to be cleaned up). For me, the System Cache is always the main culprit.

Note the directories conatining the junk files;

In my case, the following;

C:\Users\SamuelOppong\AppData\Local\Temp
C:\Windows\Temp


Note down the extensions

Click Temp Files >Details>Click View More

Put a star and a dot before each extension.

List the extensions >>

 *.exe, *.tmp, *.pptx ,*.log, *.tmp, *.txt, *.dll , *.pdf, *.wbt, *.msi, *.dmp,

Step 4: Writing the Code - Understand the Function of the Program

Since this program deletes files a good delete command is all we need to write our script;

Syntax
DEL [options] [/A:file_attributes] files_to_delete
Key
   files_to_delete : This can be a filename, a list of files or a Wildcard
options 
   /P  Give a Yes/No Prompt before deleting. 
   /F  Ignore read-only setting and delete anyway (FORCE) 
   /S  Delete from all Subfolders (DELTREE)
   /Q  Quiet mode, do not give a Yes/No Prompt before deleting.

Note what command is able to delete any file completely;

To Delete a Specific File in Command Prompt

A) In the command prompt, type the command below, press Enter, and go to step 11 below.

NOTE: Substitute Full Path of File with extension within quotes below with your files's full path and name with the extension included within quotes instead.

Code:

DEL /F /S /Q /A "Full Path of File with extension"

To Delete All Files in a Folder without Confirmation in Command Prompt
NOTE: This will not ask you if it's ok (Y/N) to delete each file when deleting all files in a folder and the folder's subfolders.A) In the command prompt, type the command below, press Enter, and go to step 11 below.

NOTE: Substitute Full Path of Folder within quotes below with the full path of the folder that you want to delete all files in.

Code:

DEL /F /S /Q /A "Full Path of Folder\*"

Step 5: Write the Code - Reverse Engineer Program

@echo off
cls
color 0a
c:
echo Cleaning Files in the Temp Folder
cd C:\Users\%username%\AppData\Local\Temp
echo y| del /F /S /Q /A *tmp *js *png *gif *ico *txt *eot *jpg *htm *json *css *xml *aspx *swf *ImageServer *en-GB *woff *[1] *axd *exe PNG[* *].bin *log *dat *dmp *extra md5[* *zip *wbt *cvr
echo Cleaning Files in the  WIndows Temp Folder
cd C:\Windows\Temp
echo y| del /F /S /Q /A *tmp *js *png *gif *ico *txt *eot *jpg *htm 
*json *css *xml *aspx *swf *ImageServer *en-GB *woff *[1] *axd *exe PNG[* *].bin *log *dat *dmp *extra md5[* *zip *wbt *cvr

Step 6: Program Completed - Top Reverse Engineering of an Amazing CleanUp Tool

Picture of Program Completed - Top Reverse Engineering of an Amazing CleanUp Tool

Go ahead and dowload the full program without needing to write 1 line of code.

Save the code as a *.cmd or *.bat file for Example CleanUp.bat

Enjoy and let me know your feedback.

If you are a Server Administrator or a Desktop Support Engineer, you would find this tool so helpful when carrying out maintenance.

You can create further deep cleaning based on the categories from the cleanup tool.

  1. System Cache
  2. Web Cache
  3. Other Software Junk
  4. Social Software Junk
  5. Video and Audio Junk
  6. Registry Junk
  7. Online Games Junk

Be creative and create a specialist tool based on the foundation shown in Reverse Engineering.

Finally set a schedule to perform the cleanup task using your script.

Click Windows Key + R

Paste : %windir%\system32\taskschd.msc /s
Click Create Basic Task.

Step 7: Download Files Here

Enjoy. Let me hear from you.

Comments

About This Instructable

980views

34favorites

License:

More by samueloppong:Fundamentals Of Networking | Understanding Network DevicesWho is that on my network and what is he doing? Network Forensics Tutorial?Advanced CMD Troubleshooting For the IT Pro
Add instructable to: