Windows Hardware Info Helper
Windows Hardware Info Helper
Info
@eisland/windows-hardware-info-helper is a plugin that queries static hardware information from the local machine via WMI (Windows Management Instrumentation). It uses a C# EXE helper with System.Management to retrieve details about CPU, GPU, memory, disks, network adapters, Bluetooth devices, motherboard, and monitors.
Overview
This plugin provides synchronous query functions for reading hardware specifications. Unlike the Performance Monitor, which tracks real-time resource usage (CPU load, memory usage, temperatures), this plugin returns static hardware details such as model names, core counts, clock speeds, capacities, and serial numbers.
Tips
Use this plugin when you need to display hardware specifications in a settings page or system info panel. For real-time monitoring data, use Performance Monitor instead.
Installation
npm install @eisland/windows-hardware-info-helperWarning
This plugin only works on Windows. It requires the .NET 10.0 runtime to be installed for building from source (dotnet build).
Features
| Function | Description |
|---|---|
getCpuInfo() | Query CPU details (name, cores, threads, clock speed, cache) |
getGpuInfo() | Query GPU details (name, VRAM, driver, resolution) |
getMemoryInfo() | Query memory slot details (capacity, speed, type, manufacturer) |
getDiskInfo() | Query disk details (model, size, interface, serial number) |
getNetworkAdapterInfo() | Query network adapter details (name, MAC, speed, type) |
getBluetoothDevices() | Query Bluetooth PnP devices via WMI (radios, HCI, protocol drivers, and user-paired peripherals) |
getMotherboardInfo() | Query motherboard details (manufacturer, model, serial) |
getMonitorInfo() | Query monitor details (name, manufacturer, physical size) |
Data Types
| Interface | Description |
|---|---|
CpuInfo | CPU hardware information |
GpuInfo | GPU hardware information |
MemorySlotInfo | Physical memory slot information |
DiskInfo | Physical disk drive information |
NetworkAdapterInfo | Physical network adapter information |
BluetoothDeviceInfo | Bluetooth PnP device information (radios, adapters, stack components, user-paired peripherals) |
MotherboardInfo | Motherboard (baseboard) information |
MonitorInfo | Display monitor information |
Architecture
Internal Mechanism
The plugin spawns a C# console EXE (eIslandHardwareInfoReader.exe) as a child process via spawnSync. The EXE uses System.Management to execute WQL queries against WMI classes (Win32_Processor, Win32_VideoController, etc.) and outputs JSON to stdout. The Node.js layer parses the JSON and returns typed arrays.
Source Files
| File | Responsibility |
|---|---|
index.js | Node.js entry point; spawns EXE helper and parses JSON output |
index.d.ts | TypeScript type declarations for all interfaces and functions |
src/Program.cs | C# EXE entry point; WMI query logic for all 8 hardware categories |
src/eIslandHardwareInfoReader.csproj | .NET project file targeting net10.0 with System.Management |
Build
| Command | Script | Description |
|---|---|---|
npm run build | dotnet build src/eIslandHardwareInfoReader.csproj -c Release | Build the C# EXE helper |
npm run clean | dotnet clean src/eIslandHardwareInfoReader.csproj | Clean build artifacts |
npm run rebuild | npm run clean && npm run build | Full rebuild |
Test
| Command | Script | Description |
|---|---|---|
npm test | vitest run --config vitest.config.ts | Run unit tests |
npm run smoke | node test/hardware-info.smoke.ts | Run smoke test |
Note
The postinstall script automatically runs dotnet build when the package is installed via npm.
Changelog
bb5b2-on

