laptop-check
v1.1.0
Published
Verify a used Windows laptop's real hardware specs and health from the command line — replaces CrystalDiskInfo, CPU-Z, GPU-Z, and BatteryInfoView with one tool.
Maintainers
Readme
💻 laptop-check
A zero-dependency CLI tool to verify a used Windows laptop's real hardware specs (CPU, RAM, GPU), health (Battery wear, SSD SMART data), display, network adapters, storage partitions, and Windows activation status. Run it instantly via
npx, or compile it to a standalone.exefor 100% offline usage on a USB stick.
Why?
When buying a used laptop you want to verify that the seller's claims match reality. Is the CPU actually an i7? How much RAM is really installed? Is the dedicated GPU alive? How degraded is the battery?
laptop-check answers all of those questions with a single command — no GUI tools to download, no clicking through tabs. Just run it and get a colour-coded pass/fail report. It also checks whether Windows is genuinely activated, verifies the display resolution and refresh rate, detects Wi-Fi/Bluetooth/Ethernet adapters, and shows how much storage is actually usable vs hidden in recovery partitions.
Quick Start
# Run directly with npx (Node 18+ required)
npx laptop-check
# Or install globally
npm install -g laptop-check
laptop-checkWindows only. This tool uses PowerShell and WMI queries that are only available on Windows. The package will refuse to install on macOS / Linux.
Usage
laptop-check [options]
Options:
--cpu Run the CPU check only
--ram Run the RAM check only
--gpu Run the GPU check only
--battery Run the battery health check only
--ssd Run the SSD/NVMe health check only
--activation Run the Windows activation check only
--display Run the display check only
--network Run the network adapter check only
--partitions Run the storage partitions check only
--full Run all checks (default)
--expect-cpu <model> Expected CPU model substring (case-insensitive)
--expect-cores <n> Expected physical core count (exact match)
--expect-threads <n> Expected logical thread count (exact match)
--expect-ram <gb> Minimum expected total RAM in GB (at-least)
--expect-ram-speed <mhz> Minimum expected RAM speed in MHz (at-least)
--expect-ram-type <type> Expected RAM type e.g. DDR4, DDR5 (case-insensitive substring)
--expect-gpu <name> Expected GPU name substring (case-insensitive)
--expect-edition <edition> Expected Windows edition substring (case-insensitive)
--expect-resolution <res> Expected display resolution e.g. "1920x1080" (exact match)
--expect-refresh-rate <hz> Minimum expected refresh rate in Hz (at-least)
--expect-wifi <standard> Expected Wi-Fi standard substring e.g. "Wi-Fi 6" (case-insensitive)
--expect-capacity <gb> Expected physical storage capacity in GB (±5% tolerance)
--profile <name> Load expected specs from profiles/<name>.json
--json <path> Write a JSON report to the specified file path
-V, --version Output the version number
-h, --help Display help for commandExamples
# Full hardware report
laptop-check
# CPU and RAM only
laptop-check --cpu --ram
# Full check + save JSON report
laptop-check --full --json report.json
# Verify the seller claims it's an i7-10750H with 6 cores, 12 threads, 16 GB RAM
laptop-check --cpu --ram --expect-cpu "i7-10750H" --expect-cores 6 --expect-threads 12 --expect-ram 16
# Use a saved profile instead of typing all flags
laptop-check --full --profile dell-3550
# Override a single value from the profile
laptop-check --full --profile dell-3550 --expect-ram 32
# Check only activation status
laptop-check --activation
# Verify seller claims it's Windows 11 Pro
laptop-check --activation --expect-edition "Windows 11 Pro"
# Check display and verify it's really FHD 144Hz
laptop-check --display --expect-resolution "1920x1080" --expect-refresh-rate 144
# Verify Wi-Fi 6 and check storage partitions
laptop-check --network --partitions --expect-wifi "Wi-Fi 6" --expect-capacity 512Example Output (with spec comparison)
💻 laptop-check — hardware health inspector
Comparing against expected specs...
CPU
Model : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz ✗ MISMATCH (expected: i7-10750H)
Cores : 2 ✗ MISMATCH (expected: 6)
Threads : 4 ✗ MISMATCH (expected: 12)
Max Clock : 2400 MHz
RAM
Total : 20 GB ✓ MATCH
Type : DDR4 ✓ MATCH
Speed : 2133 MHz ✗ MISMATCH (expected: 2933 MHz)
Slot 1 : 16 GB @ 2133 MHz DDR4 — Hynix/Hyundai HMA82GS6MFR8N-TF
Slot 2 : 4 GB @ 2133 MHz DDR4 — Samsung M471A5143EB0-CPB
GPU
GPU Name : Intel(R) HD Graphics 520 ✗ MISMATCH (expected: Quadro P620)
VRAM : 1 GB
Driver : 31.0.101.2111
Battery
Design Cap : 32560 mWh
Full Charge : 10774 mWh
Health : 33.1%
Cycle Count : 537
✗ Battery health is 33.1% (threshold: 80%). The battery may need replacement.
✗ Battery cycle count is 537 (threshold: 200). High wear detected.
SSD / NVMe
── Drive 1 ──
Model : SAMSUNG MZVLB512HBJQ-000L7
Interface : NVMe
Capacity : 512 GB
Serial : S4ENNF0M123456
Health : 98%
Total Writes : 8.52 TB
Temperature : 42°C
Activation
Edition : Windows 10 Pro ✓ MATCH
Build Number : 19045
Version : 10.0.19045
Activation : Activated
slmgr : The machine is permanently activated.
Summary
✗ FAIL CPU
✗ FAIL RAM
✗ FAIL GPU
✗ FAIL Battery
✓ PASS SSD
✓ PASS Activation
Display
Resolution : 1366x768 ✗ MISMATCH (expected: 1920x1080)
Refresh Rate : 60 Hz
Panel Mfr : CMN
Panel Model : 1495
Network
Wi-Fi : Wi-Fi 5 (802.11ac) ✗ MISMATCH (expected: Wi-Fi 6)
Adapter : Intel(R) Dual Band Wireless-AC 8260
Bluetooth : Present (version undetermined) (inferred)
Ethernet : Present
Eth Adapter : Realtek PCIe GbE Family Controller
Storage Partitions
Physical Cap : 476.9 GB ✓ MATCH
Usable Cap : 465.3 GB
Free Space : 312.1 GB
Usable % : 97.6%
Drive : SAMSUNG MZVLB512HBJQ-000L7 (476.9 GB)
C: : 465.3 GB total, 312.1 GB free
── Hidden Partitions (11.6 GB total) ──
Recovery : 0.5 GB
System : 0.1 GB
Summary
✗ FAIL CPU
✗ FAIL RAM
✗ FAIL GPU
✗ FAIL Battery
✓ PASS SSD
✓ PASS Activation
✗ FAIL Display
✗ FAIL Network
✓ PASS PartitionsWhen no
--expect-*flags are provided, fields display raw values without MATCH/MISMATCH annotations.
Red-Flag Thresholds
The tool flags potential problems using these thresholds (configurable in src/utils/thresholds.js):
| Component | Metric | Red Flag Threshold |
|-----------|--------|-------------------|
| Battery | Health % | Below 80% |
| Battery | Cycle Count | Above 200 |
| GPU | Adapter Name | Contains "Microsoft Basic Display Adapter" |
| SSD (v2) | Health % | Below 90% |
| SSD (v2) | Total Writes | Above 10 TB |
| SSD (v2) | Temperature | Above 50°C |
| CPU (v2) | Temp under load | Above 90°C |
| Activation | LicenseStatus | 0 (Unlicensed) or 5 (Notification/Non-Genuine) → ✗ RED FLAG |
| Activation | LicenseStatus | 2, 3, or 6 (Grace Periods) → ⚠ WARNING |
| Display | Resolution | Below --expect-resolution when provided → ✗ MISMATCH |
| Display | Refresh Rate | Below --expect-refresh-rate when provided → ✗ MISMATCH |
| Network | Wi-Fi Standard | Below --expect-wifi when provided → ✗ MISMATCH |
| Storage | Usable % | Below 90% of physical capacity (abnormal hidden partition usage) |
What Each Check Does
CPU (--cpu)
- Queries
Win32_Processorvia WMI - Reports: model name, physical cores, logical threads, max clock speed
- With
--expect-cpu: case-insensitive substring match against detected model - With
--expect-cores/--expect-threads: exact match (wrong count = different CPU)
RAM (--ram)
- Queries
Win32_PhysicalMemoryvia WMI - Reports: total installed RAM, generation (DDR3/DDR4/DDR5), and per-slot breakdown (capacity, speed, manufacturer, part number)
- With
--expect-ram: at-least comparison (detected ≥ expected = pass) - With
--expect-ram-speed: at-least comparison (seller under-promising is fine) - With
--expect-ram-type: case-insensitive substring match (e.g. "DDR4") - Flags mismatched RAM speeds (may prevent dual-channel)
- Flags mismatched DDR generations across slots (indicates tampered SPD data)
GPU (--gpu)
- Queries
Win32_VideoControllervia WMI - Reports: adapter name, VRAM, driver version
- With
--expect-gpu: case-insensitive substring match against any detected adapter - CRITICAL FLAG: "Microsoft Basic Display Adapter" means the dedicated GPU is dead or has no driver
Battery (--battery)
- Generates a battery report via
powercfg /batteryreport - Parses: design capacity, full charge capacity, cycle count
- Calculates health percentage — flags if below 80% or cycles above 200
SSD / NVMe (--ssd)
- Uses
smartctlto read real SMART wear-leveling data from NVMe and SATA drives - Requires Administrator privileges (will warn you if not elevated)
- The tool operates 100% offline, reading data via the bundled
vendor/smartctlbinary - Reports: interface type, exact model name, health percentage, total terabytes written, and current temperature
Activation (--activation)
- Queries
SoftwareLicensingProductvia CIM for authoritative license status (LicenseStatus 0–6) - Runs
slmgr /xpras a secondary human-readable confirmation - Queries
Win32_OperatingSystemfor edition (Caption), version, and build number - No administrator privileges required — unlike the SSD check, activation check works even without elevation
- Reports: Windows edition, build number, version, activation status (human-readable)
- With
--expect-edition: case-insensitive substring match against detected Caption (detects common misrepresentations like "Pro" vs "Home") - RED FLAG: LicenseStatus 0 (Unlicensed) or 5 (Notification/Non-Genuine)
- WARNING: LicenseStatus 2, 3, or 6 (any grace period)
Display (--display)
- Queries
Win32_VideoControllerfor resolution and refresh rate - Queries
WmiMonitorIDfromroot\wminamespace for panel manufacturer and model name - Decodes WMI byte arrays (UINT16 char code arrays) to readable ASCII strings
- No administrator privileges required
- Reports: resolution, refresh rate, max refresh rate, panel manufacturer, panel model
- Falls back gracefully when detailed panel info is unavailable (shows basic data with informational note)
- With
--expect-resolution: exact string match (e.g. "1920x1080") - With
--expect-refresh-rate: at-least comparison (detected ≥ expected)
Network (--network)
- Wi-Fi standard: Primary method is
netsh wlan show drivers→ parses "Radio types supported" for 802.11ax/ac/n mapping to Wi-Fi 6/5/4. Falls back to chipset name inference from adapter model string - Bluetooth: Queries
Win32_PnPEntityfor Bluetooth devices, extracts version from name where possible - Ethernet: Queries
Win32_NetworkAdapterfor physical Ethernet controllers (presence check only — doesn't assume link status) - No administrator privileges required
- Fields labeled "(inferred)" in the report are best-effort detections from naming conventions, not guaranteed-accurate hardware-reported data
- With
--expect-wifi: case-insensitive substring match against detected standard
Storage Partitions (--partitions)
- Queries
Win32_DiskDrivefor physical drive capacity across all installed drives - Queries
Win32_LogicalDisk(DriveType 3 = local fixed disk) for usable/lettered partition sizes and free space - Queries
Get-Partitionfor ALL partitions including hidden ones (Recovery, EFI System, Reserved) - No administrator privileges required
- Reports: physical capacity, usable capacity, free space, usable percentage, per-drive breakdown, per-volume breakdown, hidden partition listing with types
- With
--expect-capacity: compares against physical capacity with ±5% tolerance (manufacturer GB/GiB rounding is normal and not flagged) - WARNING: Flags when usable percentage is below 90% — indicates unusually large hidden partitions
Spec Comparison
The --expect-* flags let you compare detected hardware against what the seller advertised:
| Flag | Comparison | Rationale |
|------|-----------|----------|
| --expect-cpu | Substring (case-insensitive) | Sellers often add extra text around the model |
| --expect-cores | Exact match | Wrong core count = different CPU entirely |
| --expect-threads | Exact match | Wrong thread count = different CPU entirely |
| --expect-ram | At-least (≥) | More RAM than claimed is fine |
| --expect-ram-speed | At-least (≥) | Faster RAM than claimed is fine |
| --expect-ram-type | Substring (case-insensitive) | E.g., "DDR4" or "DDR5" |
| --expect-gpu | Substring (case-insensitive) | Matches against any installed adapter |
| --expect-edition | Substring (case-insensitive) | Detects edition mismatches (e.g. "Pro" vs "Home") |
| --expect-resolution | Exact match | Lower resolution than claimed is always a red flag |
| --expect-refresh-rate | At-least (≥) | Higher refresh rate than claimed is fine |
| --expect-wifi | Substring (case-insensitive) | Detects Wi-Fi standard downgrades (e.g. "Wi-Fi 6" vs "Wi-Fi 5") |
| --expect-capacity | ±5% tolerance | Accounts for normal GB/GiB rounding differences |
Hardware Profiles
Save expected specs in a JSON file under profiles/ to avoid typing all flags every time:
// profiles/dell-3550.json
{
"cpu": "i7-10750H",
"cores": 6,
"threads": 12,
"ram": 16,
"ramSpeed": 2933,
"ramType": "DDR4",
"gpu": "Quadro P620",
"edition": "Windows 10 Pro",
"resolution": "1920x1080",
"refreshRate": 60,
"wifi": "Wi-Fi 5",
"capacity": 512
}Then run:
laptop-check --full --profile dell-3550Individual --expect-* flags override profile values, so you can use a profile as a base and tweak one field:
# Profile says 16 GB RAM, but this unit was upgraded to 32 GB
laptop-check --full --profile dell-3550 --expect-ram 32JSON Report
Use --json <path> to dump the full results as a JSON file. Useful for record-keeping when inspecting multiple laptops:
laptop-check --full --json "dell-xps-15-report.json"The JSON includes all raw data returned by WMI, making it easy to script further analysis.
Building a Standalone EXE
You can compile the tool into a standalone offline distribution folder that runs on any Windows machine with zero dependencies and no internet access:
npm run build:exeThis uses pkg to bundle Node.js and all dependencies into a single binary targeting node18-win-x64.
Important: Distributing the tool means sharing the full dist/ folder, not just the .exe. The folder structure must look like this:
dist/
├── laptop-check.exe
└── vendor/
└── smartctl/
└── smartctl.exeYou can put this entire dist/ folder on a USB stick, plug it into a target laptop, and simply run laptop-check.exe. It works fully offline!
Project Structure
laptop-check/
├── package.json
├── bin/cli.js → CLI entry point (commander setup)
├── profiles/
│ └── dell-3550.json → Example hardware profile
├── src/
│ ├── checks/
│ │ ├── cpu.js → CPU model, cores, threads
│ │ ├── ram.js → RAM modules, total capacity, DDR type
│ │ ├── gpu.js → GPU adapters, VRAM, driver
│ │ ├── battery.js → Battery health, cycle count
│ │ ├── ssd.js → SMART health, wear levels, temp
│ │ ├── activation.js → Windows activation & edition check
│ │ ├── display.js → Screen resolution, refresh rate, panel info
│ │ ├── network.js → Wi-Fi standard, Bluetooth, Ethernet
│ │ └── storage-partitions.js → Usable vs hidden partition space
│ ├── utils/
│ │ ├── powershell.js → PowerShell exec wrapper
│ │ ├── thresholds.js → Red-flag threshold constants
│ │ ├── profile.js → Profile loader (JSON → expectations)
│ │ └── smartctl.js → smartmontools downloader & locator
│ └── report.js → Runs checks, prints formatted output
└── README.mdRequirements
- Windows 10/11 (uses PowerShell 5.1+ and WMI)
- Node.js 18+ (for
npxor global install) - No additional tools needed — everything runs through built-in Windows commands
Permissions note: Only the SSD/SMART check (
--ssd) requires Administrator privileges. All other checks (CPU, RAM, GPU, Battery, Activation, Display, Network, Storage Partitions) work without elevation.
Why Windows Only?
This tool is purpose-built for the used-laptop market, where Windows machines dominate. The underlying data sources (Win32_Processor, Win32_PhysicalMemory, Win32_VideoController, powercfg) are all Windows-specific APIs with no cross-platform equivalent. Rather than providing a degraded experience on other platforms, the package enforces "os": ["win32"] in package.json.
License
MIT
