🖥️ Windows Maintenance Tool



A powerful, all-in-one Windows maintenance toolkit built entirely in Batch & PowerShell.
Designed for power users, sysadmins, and curious tinkerers – now smarter, safer, and fully offline-compatible.
📸 Screenshot
✅ Features
Run essential repair tools:
- Quick access to SFC, DISM, and CHKDSK for core Windows repairs
- Component store repair and basic health scans for stuck or broken systems
Optimize SSD drives:
- TRIM and compatible defrag for faster, healthier SSDs and HDDs
Windows Update management & repair:
- Use winget to install, upgrade, and repair system packages
- Automatically installs/configures winget if missing
- Flexible package handling: view, search, and upgrade individual apps/packages by entering their ID directly
- Windows Update Repair Tool supports a full nuke & rebuild of update components, including automatic restart of key services like
cryptsvc
Network diagnostics, DNS & DoH:
- Includes ipconfig, routing table viewer, DNS configuration, adapter reset, and more
- DNS over HTTPS (DoH) management:
- Enable DoH using
netsh dns add encryption for known providers (Cloudflare, Google, Quad9, AdGuard)
- One-click Disable DoH option to remove the same encryption entries and revert cleanly
- Export detailed network information to file for troubleshooting or support
Privacy & temp cleanup:
- Clean temp files, logs, and browser cache
- Privacy cleanup for extra traces (history, cookies, etc.)
Save detailed reports:
- Export System Info, Network Info, and Driver List to your Desktop or a custom folder
Driver & device maintenance:
- Enumerate all drivers in the Driver Store using fast pnputil parsing
- Old Driver Cleanup:
- Groups drivers by package (OriginalFileName + Provider)
- Keeps the newest version in each group and marks older duplicates as removal candidates
- Mandatory driver backup before cleanup:
- Automatically exports all drivers with
pnputil /export-driver * to a timestamped DriverBackup_… folder on the Desktop
- Reuses an existing backup if it already contains at least as many driver INF files as the current system
- No deletions are performed if backup or verification fails
- Driver restore:
- Built-in “Restore Drivers from Backup” option
- Re-imports all drivers from a selected
DriverBackup_… folder using pnputil /add-driver ... /subdirs /install
Registry tools:
- Safe cleanup, backup, and corruption scan
- Menu-driven, stable registry cleaning:
- List “safe to delete” entries (IE40, IE4Data, DirectDrawEx, etc.)
- Bulk delete all safe entries
- Easy backup & restore with versioned
.reg files
DNS / hosts-based Adblock management:
- Block ad/tracker domains with a curated hosts file (multiple mirrors supported)
- Automatic backup of the existing hosts file before changes
- Improved handling of locked files and clearer status/error messages
Firewall Manager:
- Built-in menu-driven PowerShell Firewall Manager
- Manage firewall rules, enable/disable Windows Firewall directly from the tool
.NET RollForward Settings:
- Lets the system use a specific .NET version (SDK/runtime)
- Reduces the need to install multiple .NET runtimes
Shortcut Fixer:
- Automatic shortcut repair for broken Start Menu / desktop shortcuts
- Menu reorganized so “exit” and global options sit at the end for better structure
Menu-driven and user-friendly:
- All functions accessible from a clear main menu—no PowerShell experience needed
- More consistent “return to menu” behavior across tools
- Built-in support/help, Discord/GitHub contact links
- Developer Options submenu:
- Dry Run mode: simulate menu actions without touching the system, with a visible “DRY RUN ENABLED” banner in the main menu
- Dev Mode: extra diagnostics and a “DEV MODE ENABLED” banner so you always see when you are in test mode
Windows Activation:
- Thanks to the MAS (Microsoft Activation Script) project, Windows and Office activation support is integrated as an optional tool
- Full credit goes to the Massgrave team for maintaining and developing MAS
- This project does not modify or redistribute MAS — it only provides a convenient way to download and run it
- Clear warning and confirmation step ensures users read the documentation and accept responsibility before running the script
Portable & safe (for personal use):
- Runs from any folder or USB drive, no installation required
- Automatically relaunches itself with a temporary process-scoped ExecutionPolicy bypass when needed, so no code-signing certificate is required
- Core maintenance features can run offline; some modules (winget, MAS, DoH profiles, hosts adblock) use the internet when invoked
⚙️ Installation
- Start
Start_Windows_Maintenance_Tool.bat.
- Follow the interactive menu.
- Ensure that both
Start_Windows_Maintenance_Tool.bat and Windows_Maintenance_Tool.ps1 are in the same folder.
> ⚠️ Script output may appear in your system language (e.g. English, Danish, etc). This is normal.
📁 Output Files
Saved directly to your chosen folder (default: Desktop\SystemReports):
System_Info_YYYY-MM-DD.txt – full system information
Network_Info_YYYY-MM-DD.txt – detailed network configuration
Driver_List_YYYY-MM-DD.txt – list of all installed drivers
routing_table_YYYY-MM-DD.txt – network routing table
RegistryBackup_YYYY-MM-DD_HH-MM.reg – registry backup files with date/time
🧪 Troubleshooting & FAQ
Q: The script didn’t run with administrator rights?
A: For the tool to work properly, administrator rights are required.
Right-click the .bat file and choose "Run as administrator".
If nothing happens, check that UAC is enabled and try again.
Run manually with PowerShell if needed:
Start-Process powershell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File 'Path\To\Windows_Maintenance_Tool.ps1'"
Q: Why does it crash when selecting registry cleanup?
A: This was fixed in v3.1.3. The tool now safely lists and deletes registry keys with auto-backup.
Q: Why was Registry Defrag removed?
A: It depended on NTREGOPT, which is no longer accessible. The script is now fully offline and native to Windows.
📜 Credits
This release (v3.9) was contributed by @Chaython, @ios12checker
All new features, fixes, and improvements
🤝 Contributing
Pull requests, issues, and feedback are welcome!
See CONTRIBUTING.md for guidelines.
A huge thank you to everyone who has shared, reviewed, or written about the Windows Maintenance Tool!
Special mentions:
If you wrote an article or made a video, open an issue or PR to get listed here.
🎬 Video Guides
📜 License
Licensed under the MIT License.
See LICENSE for details.