Get-keys.bat May 2026
Rating: Functional but Sparse
As a command-line tool, the user interface is text-based.
Many advanced get-keys.bat scripts invoke PowerShell for cleaner extraction: get-keys.bat
powershell -command "(Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductKey"
Press Windows Key + R, type notepad, and press Enter.
This is a community-vetted, safe script that attempts three methods and displays the result clearly. Rating: Functional but Sparse As a command-line tool,
@echo off title Product Key Retrieval Tool color 0A echo ============================================== echo get-keys.bat - Product Key Finder echo ============================================== echo.:: Method 1: Check for BIOS OEM Key (Modern PCs) echo [1] Checking UEFI/BIOS for embedded key... for /f "tokens=*" %%a in ('wmic path SoftwareLicensingService get OA3xOriginalProductKey /value') do call set %%a >nul 2>&1 if defined OA3xOriginalProductKey ( echo [+] BIOS Embedded Key Found: %OA3xOriginalProductKey% echo. ) else ( echo [-] No BIOS embedded key found. echo. )
:: Method 2: Try PowerShell Method echo [2] Attempting PowerShell extraction... powershell -command "Get-WmiObject -Class SoftwareLicensingService | Select-Object -Property OA3xOriginalProductKey" > "%temp%\pskey.txt" 2>nul findstr /C:"-" "%temp%\pskey.txt" >nul if %errorlevel% equ 0 ( echo [+] PowerShell Extraction Successful: type "%temp%\pskey.txt" | findstr /V "OA3xOriginalProductKey" ) else ( echo [-] PowerShell method failed. ) del "%temp%\pskey.txt" 2>nul echo. Press Windows Key + R , type notepad , and press Enter
:: Method 3: Registry Fallback (Requires Decoder) echo [3] Checking Registry (Decoding may take a moment)... echo [+] Creating temporary decoder... echo Set WshShell = CreateObject("WScript.Shell") > "%temp%\keydecode.vbs" echo MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) >> "%temp%\keydecode.vbs" echo Function ConvertToKey(Key) >> "%temp%\keydecode.vbs" echo Const KeyOffset = 52 >> "%temp%\keydecode.vbs" echo i = 28 >> "%temp%\keydecode.vbs" echo Chars = "BCDFGHJKMPQRTVWXY2346789" >> "%temp%\keydecode.vbs" echo Do >> "%temp%\keydecode.vbs" echo Cur = 0 >> "%temp%\keydecode.vbs" echo x = 14 >> "%temp%\keydecode.vbs" echo Do >> "%temp%\keydecode.vbs" echo Cur = Cur * 256 >> "%temp%\keydecode.vbs" echo Cur = Key(x + KeyOffset) + Cur >> "%temp%\keydecode.vbs" echo Key(x + KeyOffset) = (Cur \ 24) And 255 >> "%temp%\keydecode.vbs" echo Cur = Cur Mod 24 >> "%temp%\keydecode.vbs" echo x = x -1 >> "%temp%\keydecode.vbs" echo Loop While x ^>= 0 >> "%temp%\keydecode.vbs" echo i = i -1 >> "%temp%\keydecode.vbs" echo KeyOutput = Mid(Chars, Cur + 1, 1) ^& KeyOutput >> "%temp%\keydecode.vbs" echo If (((29 - i) Mod 6) = 0) And (i ^<> -1) Then >> "%temp%\keydecode.vbs" echo i = i -1 >> "%temp%\keydecode.vbs" echo KeyOutput = "-" ^& KeyOutput >> "%temp%\keydecode.vbs" echo End If >> "%temp%\keydecode.vbs" echo Loop While i ^>= 0 >> "%temp%\keydecode.vbs" echo ConvertToKey = KeyOutput >> "%temp%\keydecode.vbs" echo End Function >> "%temp%\keydecode.vbs" cscript //nologo "%temp%\keydecode.vbs" del "%temp%\keydecode.vbs" 2>nul echo. echo ============================================== echo Script completed. Press any key to exit. pause >nul
| Pros | Cons | | :--- | :--- | | Zero Installation: Portable, leaves no footprint. | No Digital License Support: Cannot retrieve keys for hardware-linked activations. | | No Bloatware: Unlike free key finders, it contains no ads. | Intimidating UI: Not user-friendly for non-technical clients. | | Fast: Results appear in seconds. | Security Risk: Users must trust the source of the file explicitly. | | Accurate: Highly reliable for OEM/Retail keys. | Script Dependency: Relies on Windows scripting hosts that some corporate policies disable. |