Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 4.5 KB

File metadata and controls

57 lines (38 loc) · 4.5 KB

CDriveCare icon

CDriveCare

A safety-first, rule-transparent cleaner for the Windows system drive.

简体中文 · English

Quick start

  1. Download CDriveCare-v0.3.0-win.zip from the latest Release.
  2. Extract it and double-click CDriveCare.exe.
  3. Review the scan results, then select Clean selected.

CDriveCare is a single-file Windows desktop utility with no telemetry or ads and no Python or Rust dependency. At startup it makes one request to the GitHub Releases API to check for a newer stable version; it uploads no scan data, logs, file names, or device identifier. Use --no-update-check for fully offline startup. See update checking and privacy.

CDriveCare main window

Principles

  • Ship 29 reviewed rules as a read-only embedded rules.json resource. The executable does not load a neighboring rules file, and startup fails closed on missing, unknown, duplicate, or misspelled fields as well as invalid IDs, contracts, age gates, or targets.
  • Scan first and show per-rule size, file count, risk, and impact.
  • Offer Daily cleanup for low-risk items and Deep cleanup for low-risk plus review-required file rules. Neither mode automatically selects the Recycle Bin or Windows-managed actions.
  • Never automatically delete Downloads, Windows Installer, Package Cache, DriverStore, WinSxS contents, Defender data, Prefetch, event logs, or broad application directories.
  • Reject junctions, symbolic links, and other reparse points.
  • Resolve LocalAppData, RoamingAppData, ProgramData, and protected user folders through Windows Known Folder APIs instead of trusting arbitrary environment variables. The user-temp rule targets only LocalAppData Temp, not %TEMP%.
  • Open the allowed root and candidate as Windows handles, resolve their final physical paths, and delete through the validated file handle only when both remain inside the approved system-drive boundary.
  • Re-read size and last-write time from that open handle; skip candidates changed or replaced since enumeration. CDriveCare never deletes directories, including empty cache directories.
  • Use supported Windows commands for Delivery Optimization and component-store maintenance.
  • Export a read-only driver inventory instead of guessing which DriverStore package is unused.
  • Open an analyzed AppData directory from the toolbar, double-click, Enter, or its context menu, and copy its full path without turning analysis results into deletion targets.
  • Check the fixed GitHub Releases endpoint in the background and show a download link only when a newer stable version exists. CDriveCare never downloads or installs updates automatically.
  • Keep per-run audit logs locally under %LOCALAPPDATA%\CDriveCare\Logs, retaining 30 days and at most 20 files. Log and driver-report output uses unique new files and validates directory/file handles before writing or rotation.

The 29-rule catalog contains 26 file rules, one Recycle Bin action, and two Windows-managed actions. New coverage includes narrowly scoped Chrome, Edge, Outlook WebView, Tencent, VS Code, Codex, stale updater caches, and Windows kernel dumps older than 14 days. Vendor-specific additions and dump cleanup are review-required by default. User-scoped and machine-scoped WER remain separate; machine reports and kernel dumps require administrator rights.

See rule safety and architecture for the full design.

Build

Requirements: Windows 10/11, a .NET SDK, and .NET Framework 4.8.

powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1

The local build compiles the executable and runs the safety test suite. Official ZIP files, SHA-256 checksums, workflow artifacts, and GitHub Releases are packaged only by GitHub Actions. A vMAJOR.MINOR.PATCH tag must match the executable version and RELEASE_NOTES.md before the release workflow publishes assets.

Inspiration

CDriveCare reviewed JIEKE66633/One-click-cleaning-of-C-drive and tanaer/WindowsClear. It adopts useful product ideas such as scan-before-action, categorized results, progress, and visible history. The deletion engine and path safety model were implemented independently.

License

MIT