Developers often leave "keys" in plain text files. The script will recursively search the file system.
findstr /s /i "password api_key secret token" C:\Users\*.txt
findstr /s /i "password" C:\inetpub\wwwroot\*.config
Option 1: Get Windows Product Key
@echo off
title Get Windows Product Key
echo Retrieving Windows Product Key...
wmic path softwarelicensingervice get OA3xOriginalProductKey
pause
Option 2: Get Registry Keys (Interactive)
@echo off title Registry Key Viewer :menu cls echo ==================================== echo REGISTRY KEY VIEWER echo ==================================== echo 1. Show All Startup Keys echo 2. Show All Installed Software Keys echo 3. Show Current User Registry Keys echo 4. Search Registry by Keyword echo 5. Export Registry Key to File echo 6. Exit echo ==================================== set /p choice="Enter choice (1-6): "if "%choice%"=="1" goto startup if "%choice%"=="2" goto software if "%choice%"=="3" goto currentuser if "%choice%"=="4" goto search if "%choice%"=="5" goto export if "%choice%"=="6" exit get-keys.bat
:startup reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run pause goto menu
:software reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall pause goto menu
:currentuser reg query HKCU\Software pause goto menu Developers often leave "keys" in plain text files
:search set /p keyword="Enter keyword to search: " reg query HKLM /s /f "%keyword%" /k pause goto menu
:export set /p regpath="Enter registry path (e.g., HKLM\Software): " set /p exportfile="Enter export filename (e.g., backup.reg): " reg export "%regpath%" "%exportfile%" echo Exported to %exportfile% pause goto menu
Option 3: Get Keyboard Shortcut Keys (Display Help)
@echo off
title Windows Keyboard Shortcuts
echo ====================================
echo WINDOWS KEYBOARD SHORTCUTS
echo ====================================
echo.
echo General Shortcuts:
echo -----------------
echo Ctrl + C - Copy
echo Ctrl + X - Cut
echo Ctrl + V - Paste
echo Ctrl + Z - Undo
echo Ctrl + Y - Redo
echo Ctrl + A - Select All
echo Ctrl + F - Find
echo Ctrl + S - Save
echo Ctrl + P - Print
echo.
echo Windows Key Shortcuts:
echo ---------------------
echo Win + D - Show Desktop
echo Win + E - Open File Explorer
echo Win + R - Run Dialog
echo Win + L - Lock PC
echo Win + I - Open Settings
echo Win + Tab - Task View
echo Win + Print Screen - Take Screenshot
echo.
echo Alt Shortcuts:
echo -------------
echo Alt + Tab - Switch Windows
echo Alt + F4 - Close Window/Shutdown
echo Alt + Enter - Properties
echo.
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?
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. Option 1: Get Windows Product Key @echo off
Do not download random .bat files from the internet. Security experts recommend writing your own. Here is a step-by-step guide to creating a legitimate, safe get-keys.bat.