Over time, Windows systems gather a significant amount of temporary files, cached data, and system update leftovers that can lead to reduced disk space and slower performance. Regular disk cleanup is essential to maintain optimal system functionality.
Manually using the Disk Cleanup tool (cleanmgr) can be tedious, especially when you need to repeatedly select the same cleanup options. Automating this process simplifies system maintenance and ensures it is done consistently.
The FullDiskCleanUp script automates the Windows Disk Cleanup process by configuring and running the cleanmgr tool with predefined settings. This saves time and effort while ensuring that unwanted files are regularly removed.
-
The script uses the
cleanmgrtool's built-in/sagesetoption to configure specific cleanup options. These options include:- Temporary files
- Windows Update files
- Recycle Bin contents
- Internet cache and history
- System error memory dump files
-
It stores this configuration in the Windows registry for future use.
- The script runs
cleanmgrusing the/sagerunoption, which automatically cleans the selected files based on the stored settings. - No manual intervention is required as the script initiates the cleanup and removes unnecessary data in the background.
- After the disk cleanup process is complete, the script removes the custom cleanup configuration from the registry to avoid cluttering the system with multiple cleanup profiles.
-
Download the Script:
- Clone the repository or download the latest version from the Releases section.
- Extract the ZIP file to access the FullDiskCleanUp script.
-
Run the
run_this.batfile:- Locate the
run_this.batfile in the directory where you extracted or cloned the repository. - Double-click the
run_this.batfile to execute it. This file will run the PowerShell script with the necessary permissions. - If Windows SmartScreen appears, warning you that the file might be unsafe, follow these steps to bypass it:
- Click on More info.
- Then click Run anyway.
- The script will then execute with the necessary permissions.
- Locate the
-
Automatic Cleanup:
- The script will configure the
cleanmgrtool and run it with your selected options. There is no need for further manual input.
- The script will configure the
This project is licensed under the MIT License - see the LICENSE file for details.