Skip to content

R4in84/Primus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ Primus - System Utility

License: MIT Platform Version

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.

Primus Main Menu


⚡ Features

System Recovery 🔄

  • 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

System Maintenance 🧹

  • 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

System Diagnostics & Repair 🔧

  • 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

Network Tools 🌐

  • Display and flush DNS/ARP caches
  • Release and renew IP addresses
  • Reset TCP/IP stack and Winsock (includes config backups)

System Optimization ⚙️

  • 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

Security & Privacy 🛡️

  • 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

User Experience & Logging

  • 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)

🛡️ Safety Checks

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

💻 System Requirements

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

⚠️ Disclaimer

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.


📥 Installation

  1. Download Primus.bat from the Releases page.
  2. Save it to a folder of your choice.
  3. Right-click and Run as administrator.

About

The comprehensive command-line maintenance utility for Windows 10/11. Safely execute deep system cleanups, registry backups, network resets, and DISM/SFC repairs within a secure interface, protected by strict pre-execution safety checks and detailed logging.

Topics

Resources

License

Stars

9 stars

Watchers

2 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors