×

Get-keys.bat ◎

Get-keys.bat ◎

The script often attempts to backup the registry hives where local password hashes are stored.

reg save HKLM\SAM sam.bak
reg save HKLM\SYSTEM system.bak

Never download random get-keys.bat files from the internet — they could contain malware. Always inspect or write your own script, or use trusted portable tools.

Would you like a version of get-keys.bat that only outputs the Windows key (without VBS or Office scanning)?

If you don’t trust batch scripts, use well-known portable tools: get-keys.bat


  • Output format:
  • Logging: optional verbose mode logs actions to a .log file.
  • Here’s a safe, non-malicious version you can save as get-keys.bat:

    @echo off
    title Windows & Office Key Retriever
    echo ========================================
    echo     Windows & Office Key Extractor
    echo ========================================
    echo.
    

    :: Retrieve Windows product key from registry (if stored) echo [*] Checking Windows Product Key... wmic path softwarelicensingproduct get OA3xOriginalProductKey 2>nul if errorlevel 1 ( echo [!] Could not retrieve OEM key. Trying alternative method... powershell -command "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey" )

    echo.

    :: Retrieve product key using Visual Basic script fallback echo [*] Attempting fallback method via VBS... echo Set WshShell = CreateObject("WScript.Shell") > "%temp%\key.vbs" echo MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) >> "%temp%\key.vbs" echo Function ConvertToKey(Key) >> "%temp%\key.vbs" echo Const KeyOffset = 52 >> "%temp%\key.vbs" echo i = 28 >> "%temp%\key.vbs" echo Chars = "BCDFGHJKMPQRTVWXY2346789" >> "%temp%\key.vbs" echo Do >> "%temp%\key.vbs" echo Cur = 0 >> "%temp%\key.vbs" echo x = 14 >> "%temp%\key.vbs" echo Do >> "%temp%\key.vbs" echo Cur = Cur * 256 >> "%temp%\key.vbs" echo Cur = Key(x + KeyOffset) + Cur >> "%temp%\key.vbs" echo Key(x + KeyOffset) = (Cur \ 24) And 255 >> "%temp%\key.vbs" echo Cur = Cur Mod 24 >> "%temp%\key.vbs" echo x = x -1 >> "%temp%\key.vbs" echo Loop While x >= 0 >> "%temp%\key.vbs" echo i = i -1 >> "%temp%\key.vbs" echo KeyOutput = Mid(Chars, Cur + 1, 1) ^& KeyOutput >> "%temp%\key.vbs" echo If (((29 - i) Mod 6) = 0) And (i ^<^> -1) Then >> "%temp%\key.vbs" echo KeyOutput = "-" ^& KeyOutput >> "%temp%\key.vbs" echo End If >> "%temp%\key.vbs" echo Loop While i >= 0 >> "%temp%\key.vbs" echo ConvertToKey = KeyOutput >> "%temp%\key.vbs" echo End Function >> "%temp%\key.vbs" cscript //nologo "%temp%\key.vbs" del "%temp%\key.vbs"

    echo.

    :: Retrieve Office product key (if installed) echo [] Checking for Microsoft Office keys... for /f "tokens=2" %%A in ('reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Registration /v ProductName 2^>nul') do set OFFICEVER=%%B if defined OFFICEVER ( echo Found Office: %OFFICEVER% echo Trying to extract key from registry... reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Registration /v DigitalProductId >nul 2>&1 if %errorlevel%==0 ( echo [*] Office key may be encoded. Use specialized tool for exact retrieval. ) ) else ( echo No Office 2016/2019/2021 installation detected. ) The script often attempts to backup the registry

    echo. echo ======================================== echo Script completed. pause


    Picture this scenario: Your computer is running Windows 10 perfectly. You never had to enter a product key because it came pre-installed (OEM license embedded in the BIOS). Suddenly, your hard drive crashes. You replace it and attempt to reinstall Windows. The installer asks for a 25-character product key. The sticker on your PC has faded to a blank yellow square. What do you do? Never download random get-keys

    Before get-keys.bat, you would call the manufacturer or buy a new license. With get-keys.bat, you simply run the script, and it retrieves the OEM key from your motherboard’s firmware.

    Dejanos un Mensaje

    get-keys.bat