β‘ BATDOC
100% Truth-Grounded Windows Battery Intelligence Diagnostic.
Transform cryptic, 1,500-line Windows battery logs into clear executive health audits, vampire drain detection, and interactive degradation curvesβcompletely offline with zero installation footprint.
π The Problem: The Windows Battery Report Crisis
Windows ships with a powerful native diagnostic command (powercfg /batteryreport). However, the output it generates creates severe real-world problems for laptop owners, students, enterprise IT departments, and hardware buyers:
- π΄ Cryptic Wall of Data (No Actionable Health Score):
Windows generates an overwhelming 1,500+ line HTML dump filled with raw milliwatt-hours ($\text{mWh}$) and ISO timestamps. It never answers the most critical question: "Is my battery in good health, degrading normally, or dangerously deteriorated?"
- π΄ The Silent "Vampire Drain" Nightmare (Modern Standby / S0 Sleep Leaks):
Windows laptops frequently boil inside backpacks and lose 20% to 50% battery overnight while supposedly "asleep." Windows buries sleep drain records across hundreds of disjointed state-change rows, making it virtually impossible for everyday users to calculate hourly leak rates ($%/\text{hr}$).
- π΄ The Hyphen Mystery (
- Cycle Counts):
Leading OEMs (Dell, HP, Lenovo, ASUS) frequently leave hardware cycle counts reported as - through ACPI. Users mistakenly assume their battery sensors are broken or untracked.
- π΄ Invisible Lost Runtime:
Windows never calculates how many actual hours and minutes of portable unplugged battery life have vanished compared to factory specifications.
- π΄ Used Laptop Marketplace Trust Deficit:
When buying or selling second-hand laptops on eBay, Reddit, or Craigslist, buyers have no standardized, tamper-evident health certificate to verify battery honesty.
π‘ The Solution: 100% Truth-Grounded Battery Intelligence
BATDOC parses every single hardware table and telemetry log generated by Windows, translating raw engineering telemetry into an intuitive, executive-grade diagnostic dashboard.
Every metric is backed by a 100% Truth-Grounding guarantee: every card includes an expandable Audit Proof detailing the exact source table and mathematical formula derived from Microsoft's telemetry. Zero simulated metrics, zero guesswork, zero AI hallucinations.
π Windows powercfg vs. BATDOC
| Diagnostic Feature |
Native Windows powercfg HTML |
BATDOC Executive Suite |
| Battery Health Score |
Raw $\text{mWh}$ values (manual math required) |
Exact % + Condition Letter Grade (A+ to F) |
| Lost Usable Runtime |
Cryptic duration columns |
Visual Deficit Bar (5h 14m β 1h 35m, -69.6%) |
| Modern Standby Sleep Drain |
Scattered across hundreds of row items |
Vampire Drain Auditor with leak rate (%/hr) & alerts |
| Degradation History |
1,000-row chronological text table |
Interactive SVG Vector Degradation Area Chart |
| Usage Persona & Habits |
Not available |
Desk-Bound vs. Mobile Nomad AC/Battery Split |
| OEM Replacement Part |
Generic serial string |
OEM Match Guidance (DELL 55NWG37, etc.) |
| Mathematical Transparency |
Unexplained tables |
Clickable Audit Badges linking to raw source data |
| Used Marketplace Resale |
Unusable raw developer logs |
One-Click Official Printable Health Certificate |
β‘ Usage & Quickstart (Fastest to Advanced)
BATDOC is built with a zero-friction philosophy: zero complex setup, zero Python, zero Node.js, and zero registry bloat.
Choose the method that fits your workflow, ordered strictly from the fastest, zero-footprint instant command to permanent system installation and developer builds:
Fastest (3 sec) βββΊ Instant 1-Line PowerShell (No download, in-memory, auto-cleanup)
Web App / Drag & Drop (Any device, zero install, PWA)
Portable .exe (1-click, silent background execution)
Winget Package Manager (Permanent CLI command)
Portable Batch Script (USB toolkits & air-gapped systems)
Slowest / Dev βββΊ Build from Source (Custom mods & compiler scripts)
Tier 1: Instant 1-Line PowerShell (Fastest β 3 Seconds, Zero Clutter)
Best for: Anyone who wants an immediate diagnosis right now without downloading files, installing software, or cluttering their system.
Open Windows PowerShell (press Win + X $\rightarrow$ choose Terminal or PowerShell), paste the command below, and press Enter:
irm https://raw.githubusercontent.com/RootDeveloperDS/Bat-Doc/master/batdoc.ps1 | iex
β¨ What happens automatically:
- Windows queries your battery hardware via native
powercfg in your temporary directory.
- The BATDOC diagnostic engine bundles your telemetry into an interactive, self-contained report (
BatDoc-Report.html) directly on your Desktop.
- Your default browser launches immediately with your diagnostic dashboard.
- All intermediate working files are purged automatically. 100% clean, temporary, and non-invasive.
Tier 2: Instant Web App & Drag-and-Drop (Zero Install, Any Device)
Best for: Users who already have a battery-report.html file, or want to inspect reports from a Mac, Linux, tablet, or phone.
- Navigate to the hosted mirror: rootdeveloperds.github.io/Bat-Doc
- Drag and drop your
battery-report.html into the dropzone.
- (Optional) Click "Install App" in your browser's address bar to install BATDOC as a standalone Progressive Web App (PWA) in your Windows Start Menu.
- 100% Client-Side: Processes your report locally inside your browser engine. Works completely offlineβeven in Airplane Mode.
Tier 3: Standalone Portable Executable (batdoc.exe) (1-Click Native App)
Best for: Users who prefer a permanent desktop icon with zero terminal interaction.
- Download
batdoc.exe from the latest release.
- Double-click
batdoc.exe.
- Completely Silent Execution: Runs with zero black console windows flashing. It queries hardware registers, compiles
BatDoc-Report.html on your Desktop, and opens it in your browser within 2 seconds.
Tier 4: Microsoft Windows Package Manager (winget) (Permanent CLI)
Best for: Developers, system administrators, and power users who want a global command line tool.
Install via official Microsoft Winget:
winget install RootDeveloperDS.BatDoc
Once installed, invoke BATDOC from anywhere in your terminal or the Windows Run dialog (Win + R):
Tier 5: Portable Batch Script (batdoc.bat) (USB Toolkits & Air-Gapped PCs)
Best for: IT repair shops, field technicians, and air-gapped corporate computers without internet access.
- Download or copy
batdoc.bat and batdoc-standalone.html onto a USB flash drive.
- Insert into the target laptop and double-click
batdoc.bat.
- Generates the executive diagnostic locally without requiring an active internet connection.
Tier 6: Build & Compile from Source (Advanced / Developer)
Best for: Contributors customizing analytics, chart renderers, or compiling custom Windows binaries.
Clone the repository and inspect the modular source:
git clone https://github.com/RootDeveloperDS/Bat-Doc.git
cd Bat-Doc
Run validation tests, bundle the standalone HTML engine, and compile the native Windows C# binary:
# Validate syntax and module integrity
node .\tools\test-bundle.js
# Compile standalone single-file HTML distribution
node .\tools\build-standalone.js
# Compile native Windows PE executable (uses native csc.exe, zero external compiler needed)
powershell -ExecutionPolicy Bypass -File .\tools\build-exe.ps1
# Validate Winget manifest schema compliance
powershell -ExecutionPolicy Bypass -File .\tools\test-winget.ps1
π©Ί Core Diagnostic Architecture
BATDOC is built upon 7 core diagnostic pillars designed to extract actionable intelligence from hardware logs:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BATDOC DIAGNOSTIC CORE β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββΊ 1. Exact Chemistry Retention (A+ to F Grading)
β Formula: (Full Charge Capacity / Design Capacity) * 100
β Renders calibrated SVG progress arc with color-coded health status.
β
ββββΊ 2. Lost Usable Runtime Analysis
β Compares initial factory active battery life against observed
β current active discharge runtime to quantify hours lost.
β
ββββΊ 3. Modern Standby Vampire Drain Auditor
β Filters sleep/suspend intervals to flag drain rates exceeding
β 1.5%/hr, diagnosing background network wakeups and thermal leaks.
β
ββββΊ 4. Vector Degradation Curve (100% Offline SVG)
β Renders a high-resolution, responsive vector curve mapping capacity
β decay over weeks, months, or years against the factory design baseline.
β
ββββΊ 5. Power Persona & Battery Habit Classification
β Measures cumulative plugged-in (AC) time vs battery discharge cycles
β to classify user habits ("Desk Bound", "Hybrid", "Mobile Nomad").
β
ββββΊ 6. 100% Truth Grounding & Raw Audit Trail
β Clickable "Proof" badges reveal the underlying Windows table rows,
β guaranteeing mathematical honesty and reproducible calculations.
β
ββββΊ 7. Official Printable Used Laptop Health Certificate
One-click print/PDF report formatted for buyers and sellers verifying
battery authenticity on secondary marketplaces.
π Privacy & Security Architecture
BATDOC was engineered from the ground up for zero data exfiltration:
- π‘οΈ 100% Client-Side Processing: All parsing, statistical analysis, and SVG generation execute locally in your browser memory.
- π‘οΈ Zero Network Calls: No telemetry, no Google Analytics, no tracking pixels, and no remote API dependencies.
- π‘οΈ Air-Gap Compatible: Disconnect your internet connection or switch to Airplane ModeβBATDOC works with 100% functionality.
- π‘οΈ Zero Registry Infiltration: The 1-line PowerShell launcher runs in-memory and leaves no persistent background services or scheduled tasks.
π Project Structure
BATDOC maintains a clean, decoupled modular codebase: