Digi Networking Solutions

Let's Dream It Together

Keep your system clean – Run automatic system cleaner on Startup.

Keep your system clean – Run automatic system cleaner on Startup.

How to clean up windows system on startup?

Its really frustrating when your system works slow or run out of space because of temp files. its the situation when your computer does not does not work as per your requirement or you think why my system is slow even I have good configuration system. yes it really depends on your configuration like RAM and CPU power but in most cases this does not help because of the size of temp exceeds the folder size then your computer really goes our of score. Keep your system clean – Run automatic system cleaner on Startup.

In this post we will discuses step by step how to configure and clean your system automatically when ever you turn on the system. This can be applied for windows server also. Just follow these steps to make your system run like pro.

To understand which folders are consuming space and make our system slower | which folders can be safely removed from the system to improve system performance. Click here to read.

Steps to Keep your system clean – Run automatic system cleaner on Startup.

  1. Copy below code text to the notepad and save notepad as Cleaner.bat

    Below is the batch code we can use it to clean the all junk files from system. But make sure you save it as Cleaner.bat in other drive like E of D drive in individual folder so that it will not be accidental deleted. also make sure you set save as type to all files.

    @echo off
    del /s /f /q c:\windows\temp*.*
    rd /s /q c:\windows\temp
    md c:\windows\temp
    del /s /f /q C:\WINDOWS\Prefetch
    del /s /f /q C:\Windows\SoftwareDistribution
    del /s /f /q C:\Windows\Installer\$PatchCache$\Managed
    del /s /f /q C:\Windows\Temp
    del /s /f /q C:\Windows\Logs
    del /s /f /q %temp%*.*
    rd /s /q %temp%
    md %temp%
    deltree /y c:\windows\tempor~1
    deltree /y c:\windows\temp
    deltree /y c:\windows\tmp
    deltree /y c:\windows\ff*.tmp
    deltree /y c:\windows\history
    deltree /y c:\windows\cookies
    deltree /y c:\windows\recent
    deltree /y c:\windows\spool\printers
    del c:\WIN386.SWP
    cls
    ****END CODE****

  2. Open task scheduler from computer management

    Now you will need to open the task scheduler from computer management. You can either press win+r and type compmgmt.msc or type taskschd.msc. Other way you can right click on start menu and select computer management.

  3. Create basic task under task scheduler

    once the task scheduler is open you will need to click and expand task scheduler library. Then on left side create basic task.

  4. Type name and select the

    Once you click task scheduler library it will ask to type name of your task type anything like cleaner then click next. it will come to trigger tab ‘when do you want the task to start?’ select when the computer starts or as per your preference. Click next again.

  5. Select start a program

    On action tab choose first option start a program. Click next

  6. Select the program

    On Next tab it will ask to select a program. click on browse and open the folder where you saved the earlier cleaner.bat file. Add argument and start in is the optional you cal leave them blank. Then click on next and finish.

  7. Test the scheduler program

    Once the scheduler program is setup, you can test your connection. select the program and on right panel click on Run.

This is the complete process of setting up the automatic system cleaner. once you power on the system this will be done automatically. hopefully this should help. Below is the complete batch script you can copy.

@echo off
del /s /f /q c:\windows\temp\*.*
rd /s /q c:\windows\temp
md c:\windows\temp
del /s /f /q C:\WINDOWS\Prefetch
del /s /f /q C:\Windows\SoftwareDistribution
del /s /f /q C:\Windows\Installer\$PatchCache$\Managed
del /s /f /q C:\Windows\Temp
del /s /f /q C:\Windows\Logs
del /s /f /q %temp%\*.*
rd /s /q %temp%
md %temp%
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
cls

*********END CODE************

Subscribe for RSS feeds. Authour: Annan Malla