Primus is a collection of scripts I use to maintain, clean, and optimize Windows 10/11. It consolidates various system tasks into a single interface with built-in safety checks and logging.
It uses native Windows tools (SFC, DISM, CHKDSK, and PowerShell) to help with system health, file system issues, and privacy settings. Supports x86, x64, and ARM64 architectures.
- Create manual System Restore Points
- Basic Shadow Copy cleanup (keeps the most recent)
- Registry hive backups (SYSTEM, SOFTWARE, SAM, etc.)
- Emergency Registry restore script generation
- Driver backups via DISM export
- Checks for disk space before running tasks
- Organized sub-menus for General and Deep cleanup tasks
- Clean up temporary files (User + System)
- Reset Windows Update download cache
- Clear crash dumps and error reports
- Rebuild icon and font caches (fixes visual glitches)
- Browser cleanup (supports Chromium, Firefox, Arc, and Opera variants)
- Reset Windows Store cache
- WinSxS Component Store cleanup (Standard + Deep modes)
- Clear system event logs
- Query volume dirty bits
- Read-only integrity scans
- Schedule and cancel offline repairs (with registry lock validation)
- System File Checker (SFC) with basic log parsing
- DISM health checks and image scans
- DISM image repair with reboot-pending detection
- Display and flush DNS/ARP caches
- Release and renew IP addresses
- Reset TCP/IP stack and Winsock (includes config backups)
- SSD TRIM and HDD defragmentation
- CompactOS system compression (Enable/Disable)
- Manage Hibernation file size (Disable / Reduced / Full)
- Toggle Windows Reserved Storage (Build 18362+)
- Shadow Copy storage limits (5GB to 20GB)
- Basic memory usage analysis (grouped by application)
- Clear clipboard and flush standby RAM cache
- Microsoft Safety Scanner (MSERT) integration (x86/x64/ARM64 auto-detect)
- Reset Windows Firewall to default settings (includes rule backup)
- Windows Defender history and scan log cleanup
- Force Defender signature updates
- Toggle System Telemetry and Activity History
- Disable Cortana web search and App Advertising ID
- Manage CEIP and Error Reporting tasks
- Detection for Windows Insider / Dev Builds
- Consistent UI alignment using variable expansion
- Locale-independent ISO-8601 logging format (YYYY-MM-DD)
- Clean elevation handoff (automatically kills un-elevated ghost terminals)
- Displays reclaimed space after cleanup tasks
- Session summary showing total space freed and duration (with native batch fallbacks)
| Feature | Description |
|---|---|
| Admin Check | Automatically requests elevation and kills the background instance |
| First-Run EULA | Requires acknowledgment of risks via zero-byte state marker on first launch |
| Space Validation | Skips heavy operations if <2GB free to prevent corruption |
| WMI Crash Guard | Gracefully bypasses storage blocks if the system's WMI repository is corrupted |
| Backup Scripts | Automatically backs up Registry, Firewall, and Network configs |
| Locked Files | Bypasses in-use files without forced deletion |
| Transactional Rollbacks | Reverts Safe Mode BCD boot flags if the restart command is blocked by the OS |
| Build Awareness | Checks build versions to prevent running unsupported features |
| Requirement | Specification |
|---|---|
| Operating System | Windows 10 (Build 19041+) or Windows 11 |
| Edition | Pro, Enterprise, or Education (Home has limited support) |
| Privileges | Administrator rights required |
| Disk Space | Minimum 2GB free for repair tasks |
Primus is provided "AS-IS" without any warranty. While I've included safety checks, this utility performs modifications to system files, network settings, and security policies.
By using this script, you acknowledge you are doing so at your own risk. I am not responsible for any data loss or system instability. Always create a Restore Point (Option A) before running deep maintenance tasks.
- Download
Primus.batfrom the Releases page. - Save it to a folder of your choice.
- Right-click and Run as administrator.
