coRpSE's System Info/Cleanup Utility Batch file


Wed Jun 17, 2020 1:10 am
Clan Leader
Top Dog
2600 Posts
CleanUp v2
Windows 10 Only

A few years ago, I had made a post that allowed you to copy some code I put together into a ".bat" file and you could
run it to help delete any temp files your computer may have created. Well, I went a bit further with the script and I hope it helps you a little bit.
There is a ton of stuff I have done to this system and for me, its a good system to have around when i need to do something fast.

Features of the script:
  1. Full Menu navigation
  2. Checking system to see if you ran it as Administrator or not
  3. 2 types of cleaning possible
  4. Can display your system info for you
  5. Check and repair Windows 10, (More info below)
  6. Opens your host file for easy editing
  7. Opens Disk Cleanup for you
  8. Network Check
  9. Flush DNS along with dump and renew your DHCP assigned addresses if you like to have that done.
  10. Port Listing
  11. Ping & Traceroute
  12. Certain sections allows you to save the information to text file, (Good for when dealing with support and you need that information.)
  13. Create a .bat file that will automatically clean your Windows temp folder upon system boot.
  14. Windows 10 clean temp files on startup of PC
  15. Windows 10 Color Calibration
  16. Create a GodMode shortcut
  17. Rebuild Icon Cache
  18. Recover your Windows 10 product code

Mind you, that I am still somewhat new to it and this was more of a fun side thing I wanted to do for my self and figured I would share
what I have been working on for the last couple of days.

The "Recover your Windows 10 product code" feature was put in because now, most computers you buy from places like iBuyPower, CyberPower, Dell, ect... do not give you a sticker with your Windows 10 license, but instead will sometimes give it to you in a email, or attach it to your profile on their site, and other times, like in my case, they don't give it. There are a few programs out there to get it, but I found a Command Prompt code I could use, and I figured I would put it into this script for everyone to easily use.

I mentioned above about the Windows 10 check and repair, well that uses the built-in checking system that win 10 offers, as long as you know the command for it. Here, its as simple as typing a number and hitting enter.

Is this a replacement for something like Glary Utilities?
Absolutely not, but, in this script, I can run daily and run Glary Utilities once a week or once every other week.
Glary Utilities is free, check it out.

Please login to see this link
Get registered or Log in

Some of you may get a warning of potential harm or something by your antivirus, it's a false positive.
The code is visible to all just by right-clicking on the file and selecting edit, or open with a code editor or notepad.

How to use:
  1. Download the attached file to your desktop
  2. Extract the CleanUp_v2.bat file from the .zip file to your desktop
  3. Right-click on the CleanUp_v2.bat and select "Run as administrator"
  4. Enjoy...

Not really hard, is it.

If you want to resize how big your cmd prompt displays every time you open it,
Follow the instructions in this repeating animated image.

Here is the latest changes that can be see on DiffChecker.
Please login to see this link
Get registered or Log in

Here are a few screenshots:
Expand  Expand   Expand

If you prefer to create your own batch file, here is this source code as of now.

Please login to see this link
Get registered or Log in

You can create this into your own batch file.
All you need to do is paste the code into a text file, then change the file type to .bat instead of .txt.
Please note, this is being given out freely, but don't try passing this off as your own work. Leave the copyrights as is.

Icon Image Here:
Please login to see this link
Get registered or Log in

Sun Jun 21, 2020 11:17 pm
Clan Leader
Top Dog
2600 Posts
Big update today.
I have added in a bunch of new features. I have updated my first post as well as reset the download.

Changes over the previous version:
  • Added in Network Check, Ping / traceroute to IP/URL of your choice, Port Listing.
  • Added in abilities to have multiple options on certain sections
  • Added in a system in key area's that will print out the info to files for use.
  • System will now ask if you like to view your saved file, and if yes, will open it in notepad.
  • Cleaned up the system and organized everything, so they are in order.
  • A bunch more small things.

Overall, this system is just a fun project that I have been having fin with and if anything. I am putting this together for my self.
I was originally going to do this in Powershell, but I know some may have some issues with running that, and I haven't messed with .bat files in a long time, so I wanted to have some fun.
Use this however you like. This Utility script has a bunch going for it that can and possibly will come in handy for you, unless you know all the commands.

Any questions, feel free. If someone would like me to do a basic tutorial on this, let me know and I will do one up asap.

Fri Jun 26, 2020 10:56 pm
Clan Leader
Top Dog
2600 Posts
New update today.
Some minor changes in various areas.

New Addition:
New section will automatically allow you to create or delete a "AutoClean.bat" file in your Windows 10 Startup folder.
What this does, is, that it will automatically delete your temp files found in the %temp% folder upon you booting into your Windows 10.
Most tutorials tell you how to manually create this, and in this script, not only will it check to see if you have one, it will create
the file for you with all the code in it, and if you don't want it anymore, then it will delete it for you.
I have built in checks and if it fails to create, or if it fails to delete, it will tell you.

Additional info:
The location of the temp folder can be see if you go to your search bar on your windows, (Cortana search bar), can type
"run", but without the quotes, then select open.

Now, to see the folder where the temp files are and that will be cleaned every boot, just type
%temp% into the "run".

If you want to see where the AutoClean.bat file will be created or has been, depending on if you have created it your self or ran the script already.
Just open the "run" like before and type shell:Startup

Download and the .txt file have both been updated.

Thu Aug 27, 2020 7:09 pm
Clan Leader
Top Dog
2600 Posts
Another update today. The things that have been added:
  • Added in the ability to Flush DNS, (11).
  • Added in an option with #11, (Flushing DNS), to dump and renew your DHCP assigned addresses.

Updates done:
  • Fixed the [Y/N] on the clean and Deep clean. The issue was, if you left the option emptied, and clicked Enter, it would register it as a Y. and your PC would be shut down after you ran the scan. Now it will warn you that you entered and invalid response.

Doesn't seem like much, but a lot was done just for those few things.

Fri Aug 28, 2020 2:37 pm
35 Posts
Nice work coRpSE, thank you  zwinkern
Fri Aug 28, 2020 6:10 pm
Clan Leader
Top Dog
2600 Posts
No problem. zwinkern

Thu Sep 03, 2020 7:31 pm
Clan Leader
Top Dog
2600 Posts
Okay, Update again today. This is probably my last update. (I know I have said that to some of you already).
I did post up on diff checker the exact changes that have been made from the last version to this version.

Check it out here >>
Please login to see this link
Get registered or Log in

I added in 2 new options and 1 new feature. It originally started as one new feature, then I kept going with it.

  • The new feature put in is when you do either a Simple Clean or a Deep Clean, after you get prompt asking if you want to shut down your PC, you will now also get prompt to see if you like the system to attempt to clean your recycling bin, (will be permanently deleted). This was a little-bit tricky since even though you may have the recycling bi icon on your desktop, and you own it, you will see files from all your hard drives in that one folder, so you would think that was just one folder, and if you thought that, you be wrong like I was.

    If I was to just say empty the folder on your main drive, (with your desktop on it), any file in the recycling bin with that drive letter would be deleted, but not any files form lets say a secondary drive. So lets say you have 3 files in your Recycling Bin and your primary drive was C:\, and each one was like:

    •   C:\Users\BOB\DeskTop\
    •   C:\Users\BOB\DeskTop\
    • BIGTIME.png   D:\Images\Projects in my mind\

    Well, if I rant the batch file to empty the recycling bin like it seems everyone said to, it would just delete the first two files which you can see are on the primary drive. The "BIGTIME.png" wouldn't have been deleted because it is on the D:\ drive even though if you open up your Recycling Bin on your Desktop, it would be in there. I had to write it so it loops through all Recycling Bins to empty them.

    You lean something new every day.

  • First new option, making a God Mode shortcut. I give 3 locations the script can attempt to make it for you, or the 4th option is instructions to create one, which you can actually give it a name and custom icon to. Unfortunately, because of limitations of batch files, I am unable to do the 4th options within the script. Now, if this was written in PowerShell, I could.

  • Last option is to rebuild your Icon Cache. Sometimes your icons can get corrupt or fragmented, and this will delete and rebuild a fresh new one for you.

I also removed all reference to CCleaner from the system. I am about to write a news article on it. I know I am a little late to that party, but not as late as you are. zunge zeigen
Unless if you already knew this then dang it, why didn't you tell me. big grin

Sun Nov 22, 2020 8:57 pm
Clan Leader
Top Dog
2600 Posts
Okay, new update coming.

I have added in a new option that targets testing your memory. This is a little bit of an extension of the already option of "System Info", where this one is specific to the memory and you can export that to its own file, but also, at the end, you can schedule a memory diagnostic either now or upon the next restart using the built-in Windows Memory Diagnostic tool.

Thu Mar 18, 2021 8:33 am
Clan Leader
Top Dog
2600 Posts
Okay, New update added today. Just a single new feature.

#18 - Recover your Windows 10 product code

This was added after I realized that I couldn't find my Win 10 product key for my computer, and come to find out that they don't do the stickers really anymore for it is too easy for people to steal them, to they embed it into the hardware/software when built. Some companies will send you and email or attach it to your account on their site, but, some don't. So this is a way to get your Win 10 serial without needing to install a 3rd party program, (since this not a program and does not get installed).

Forums ©