Version: 1.0.0.7
A Windows batch script that helps clean, optimize and maintain a PC. Includes an auto-update mechanism that fetches the latest script from GitHub so you can keep the tool up-to-date automatically.
- Features
- How it works
- Menu options
- FPS Boost (details)
- Requirements
- Usage
- Security & warnings
- How auto-update works
- Disable auto-update (optional)
- Contributing
- License
- Changelog
- Auto-update: checks a GitHub-hosted file for latest version and updates the script automatically.
- One-menu access to common maintenance tasks:
- Malware Removal Tool (MRT)
wingetbulk updates for applications- Clear temporary files
- Empty Recycle Bin
- Flush DNS cache
- Clean Windows Update cache
- Run
sfc /scannowandDISM /RestoreHealth - Disk Cleanup
- Gaming / FPS Boost submenu with multiple tweaks (service management, registry tweaks, power plan, Xbox/Game Bar disable, GPU cache cleaning, network reset, etc.)
- Ability to revert FPS Boost tweaks.
When launched the script:
- Downloads the "latest version" number from GitHub.
- Compares it with the script's embedded
current_version. - If a newer version exists on GitHub it downloads the new script and replaces the running script file, then restarts.
- Presents a text menu where you pick maintenance tasks. Each selection runs native Windows utilities/commands.
The menu shows options and runs the corresponding action:
- [1] Run MRT (Malware Removal Tool) — starts Windows MRT (built-in quick scanner).
- [2] Update all programs — runs
winget upgrade --allto update installed apps (requireswinget). - [3] Clear Temp Files — deletes
%temp%andC:\Windows\Temp. - [4] Empty Recycle Bin — runs PowerShell
Clear-RecycleBin -Force. - [5] Flush DNS Cache — runs
ipconfig /flushdns. - [6] Clean Windows Update Cache — stops Windows Update services, removes
C:\Windows\SoftwareDistribution, restarts services. - [7] Run SFC (System File Checker) —
sfc /scannow. - [8] Run DISM (Restore Health) —
DISM /Online /Cleanup-Image /RestoreHealth. - [9] Improve FPS / Gaming Mode — opens the FPS Boost submenu (see below).
- [10] Exit — closes the script.
- [11] Run Disk Cleanup — runs
cleanmgr.exe /sagerun:1.
The FPS Boost submenu contains options to apply or revert multiple performance-oriented changes:
-
Install FPS Boost:
- Stops and disables services:
SysMain,DiagTrack,WSearch,Fax. - Disables transparency and animations via registry.
- Disables Game Mode pre-launch features and Edge prelaunch/background features via registry.
- Many changes may require restart.
- Stops and disables services:
-
Reset FPS Boost:
- Re-enables services and registry entries changed by the install step.
-
Other FPS submenu items:
- Disable notifications / focus assist (registry).
- Set High Performance power plan:
powercfg /setactive SCHEME_MIN. - Disable Xbox Game Bar & DVR and stop related services.
- Reset network: release/renew, winsock reset, IP reset.
- Clean GPU cache (NVIDIA GLCache & DXCache).
- Clear clipboard.
- Disable Windows Tips.
- Adjust visual effects for best performance (registry).
- Reset all FPS Boost tweaks (runs same revert commands as Reset).
- Windows 10 / Windows 11 (designed for modern Windows).
- Administrative privileges for most actions (service stop/start, registry edits, deleting system folders).
curlavailable at%SystemRoot%\System32\curl.exe(modern Windows includes curl).wingetinstalled for the "Update all programs" option (optional).- Running from a local disk (recommended) for safe updating.
- Save the batch script (e.g.
CleanPC.bat) to a location on your machine (e.g.,C:\Tools\CleanPC.bat). - Run as Administrator:
- Right-click → Run as administrator, or
- Open an elevated Command Prompt and run:
C:\Tools\CleanPC.bat
- Follow text menu prompts to choose an action.
- Backup first: Some operations modify the registry or stop services. Create a restore point or backup important data before using the script.
- Admin required: Many functions will fail without elevated privileges.
- Windows Update cache deletion: Deleting
C:\Windows\SoftwareDistributionwill remove update download cache; downloads will be re-fetched if needed. - Service changes: Disabling services like
SysMain(Superfetch) orWSearchmay affect non-gaming performance (search indexing, prefetch benefits). - Registry edits: Modifying registry values can have unintended side effects. Use caution.
- Use only trusted sources: Auto-update downloads the updated script from the
version_url/script_urldefined in the script — make sure those URLs point to a trusted GitHub repository.
- The script reads
current_version(embedded in the script). - It downloads a text file
latest_version.txtfrom the configuredversion_url(GitHub raw link). - If
latest_version!=current_version, it downloads the new batch file fromscript_urland overwrites the running script, then restarts. - The script uses the Windows
curlbinary at%SystemRoot%\System32\curl.exe.
If you prefer updates to be manual, remove or comment the auto-update section at the top (the curl download and compare logic). Alternatively set the version_url and script_url variables to empty strings to skip the check.
- Fork the repo, make changes and open a PR.
- Keep the
current_versionupdated when merging changes. - Ensure any new tools or commands are documented and checked for admin requirements.
This project is licensed under the MIT License. See the LICENSE file for details.