Automate Windows Hello PIN entry via USB HID keyboard (Raspberry Pi Pico).
Windows Hello's Credential Dialog is protected by UIPI — no software input method
(SendInput, pyautogui, pywinauto) can type into it. pywinhello uses a Raspberry Pi
Pico as a USB HID keyboard to bypass this restriction and enter PINs automatically.
- Process-aware: identifies which app triggered Windows Hello, enters the correct PIN
- Two-pass detection: handles both PIN mode and fingerprint mode automatically
- Progressive API: from raw HID keyboard to full daemon monitor
- Zero polling: uses WinEvent hooks for instant dialog detection
- Automated Pico setup: flashes CircuitPython, downloads libraries, installs firmware
pip install pywinhelloAny Raspberry Pi Pico variant (Pico, Pico W, Pico 2, Pico 2 W) — ~$4.
# Hold BOOTSEL on Pico, plug in USB, then:
pywinhello setup-picoThis handles everything: flashing CircuitPython, downloading adafruit_hid, and installing the HID bridge firmware.
pywinhello ping
# PONG from COM8from pywinhello import enter_pin
# One-shot: enter PIN when dialog appears
event = enter_pin("1234")
print(event.dialog_dismissed) # True if PIN was acceptedCreate config.yaml:
apps:
- exe: MarketSpeed2.exe
pin: "1234"
- exe: chrome.exe
pin: "5678"from pywinhello import HelloMonitor, load_config
config = load_config("config.yaml")
monitor = HelloMonitor(config)
monitor.serve(on_event=lambda e: print(e))# Run monitor daemon
pywinhello serve -c config.yaml
# Ping Pico
pywinhello ping
# Set up Pico (flash + firmware)
pywinhello setup-picoHost (Python) Pico (CircuitPython) Windows
┌──────────┐ serial ┌──────────┐ USB HID ┌──────────┐
│ pywinhello│─────────→│ code.py │───────────→│ Credential│
│ │ TYPE:1234 │ keyboard │ keystrokes │ Dialog │
│ │←─────────│ │ │ │
│ │ OK │ │ │ │
└──────────┘ └──────────┘ └──────────┘
serve() Daemon — handles all dialogs automatically
└── handle_next() One-shot — wait for next dialog
└── enter_pin() Immediate — type PIN into current dialog
└── HIDKeyboard Raw — serial HID bridge
- Dialog detection —
SetWinEventHook(EVENT_OBJECT_CREATE)detectsCredential Dialog Xaml Hostinstantly - Process identification —
GetWindow(GW_OWNER)traces the dialog to the requesting process - Focus —
AttachThreadInput+SetForegroundWindowbrings the dialog to focus - Two-pass entry — Types PIN directly; if dialog persists, sends ESCAPE to navigate from fingerprint to PIN mode, then retries
- HID bypass — Physical keyboard input from the Pico bypasses UIPI restrictions
MIT