Loading

Hwid — Checker.bat

Creating a Batch script to check Hardware IDs (HWID) is a common task for system administrators or users who need to generate a system fingerprint for licensing or inventory purposes.

Below is a helpful and safe Batch script that retrieves the most common hardware identifiers (Motherboard, CPU, BIOS, and Hard Disk) using standard Windows Management Instrumentation Command-line (WMIC) tools.

The HWID Checker (.bat): A Technical Write-Up

How to run:

  1. Copy the code into Notepad.
  2. Save as HWID_Checker.bat (make sure extension is .bat, not .txt).
  3. Right-click the file → Run as administrator.
  4. The script will display unique hardware identifiers.

3. Windows Activation Troubleshooting

Modern Windows activation (Digital License) is tied to the HWID. If a user swaps a motherboard and Windows suddenly deactivates, running this script helps identify that the hardware fingerprint has changed.

Step 3: Run the Script

Right-click on hwid checker.bat and select Run as Administrator. Note: Some hardware IDs (like disk serials) require admin privileges. hwid checker.bat


The Code

@echo off
title System HWID Checker
color 0A

echo ========================================== echo HARDWARE ID CHECKER echo ========================================== echo.

:: Check for Admin privileges (Required for some WMIC commands) net session >nul 2>&1 if %errorLevel% == 0 ( echo [Status] Running with Administrative Privileges... ) else ( echo [Warning] Admin privileges not detected. Some info may be missing. ) echo.

echo [Motherboard Information] echo ---------------------------------------------------------- :: Get Motherboard Serial Number for /f "skip=1 tokens=2 delims==" %%A in ('wmic baseboard get serialnumber /value') do set "MBSerial=%%A" echo Serial Number: %MBSerial% Creating a Batch script to check Hardware IDs

:: Get Motherboard Product Name for /f "skip=1 tokens=2 delims==" %%A in ('wmic baseboard get product /value') do set "MBProduct=%%A" echo Product Name: %MBProduct% echo.

echo [BIOS Information] echo ---------------------------------------------------------- :: Get BIOS Serial Number for /f "skip=1 tokens=2 delims==" %%A in ('wmic bios get serialnumber /value') do set "BIOSSerial=%%A" echo BIOS Serial: %BIOSSerial% echo.

echo [System UUID (Unique Hardware ID)] echo ---------------------------------------------------------- :: Get the System UUID for /f "skip=1 tokens=2 delims==" %%A in ('wmic csproduct get uuid /value') do set "HWID=%%A" echo UUID: %HWID% echo. Copy the code into Notepad

echo ========================================== echo END OF REPORT echo ========================================== pause

Part 9: How to Modify HWID Checker.bat for Your Needs

Common commands used

Example batch snippet:

@echo off
echo Machine GUID:
reg query "HKLM\SOFTWARE\Microsoft\Cryptography" /v MachineGuid
echo CPU ProcessorId:
wmic cpu get ProcessorId
echo Disk serials:
wmic diskdrive get serialnumber,model
echo BIOS serial:
wmic bios get serialnumber
echo UUID:
wmic csproduct get UUID
echo MAC addresses:
wmic nic where "MACAddress is not null" get Name,MACAddress
pause
hwid checker.bat