HandleHunter
LockSmith's 134KB sibling — pure C, no runtime, no install. Same NetFileEnum-based SMB lock detection and force-release, in a binary small enough to keep on a recovery USB.
HandleHunter is the version of LockSmith that lives on the USB stick in your bag. Same job — find who’s holding a file open over SMB and kick the session off — but written in pure C with no runtime, no installer, and a 134 KB executable that opens instantly on a machine you’ve never touched. At that size you keep it around for the one time you actually need it.
What it does
- Displays open files on the local machine at launch.
- Filters results as you type.
- Supports Ctrl+Click and Shift+Click multi-select.
- Releases selected locks with confirmation.
- Detects Windows light/dark theme.
- Uses PerMonitorV2 DPI awareness for high-DPI displays.
- Embeds its UAC elevation and DPI manifest.
Requirements
- Windows 7 or later.
- Administrator privileges.
- Visual Studio 2022 Build Tools only if building from source.
HandleHunter uses NetFileEnum and NetFileClose, so it must run elevated.
Safety warning
Force-closing file locks can interrupt another process. This can lose unsaved data, crash an application, or corrupt a file being written. Use it only when closing the owning application normally is not possible.
Install
Download the latest release from:
https://github.com/Swatto86/HandleHunter/releases
Run HandleHunter.exe as Administrator.
Basic workflow
- Right-click
HandleHunter.exe. - Choose Run as administrator.
- Search by file name, path, or username if the list is long.
- Select one or more rows.
- Click Release Selected Lock(s), press Delete, or double-click a row.
- Confirm the release.
Keyboard shortcuts
| Shortcut | Action |
|---|---|
| F5 | Refresh file list |
| Delete | Release selected locks |
| Ctrl+A | Select all files |
| Ctrl+Click | Select multiple individual files |
| Shift+Click | Select a range |
| Tab | Move between controls |
| Double-click | Release selected lock with confirmation |
Build from source
Install Visual Studio 2022 Build Tools with the Desktop development with C++ workload, then run:
build_msvc.bat
Clean build artifacts:
build_msvc.bat clean
The build embeds the application icon, manifest, visual styles, elevation requirement, and DPI awareness settings.
Technical notes
HandleHunter is written in C99 and uses Win32 directly. It implements its own small utility layer for memory, strings, arrays, and formatting so it can stay CRT-free. The UI uses standard Windows controls with theme detection.
Troubleshooting
Access denied
Run as Administrator.
Side-by-side configuration error
Rebuild from a clean tree with build_msvc.bat clean followed by build_msvc.bat.
No locks are shown
There may be no matching open files exposed through the Windows network file APIs. Try refreshing, confirm the Server service is running, or use a deeper local-handle tool for process-owned local handles.
Links
- GitHub:
https://github.com/Swatto86/HandleHunter - Releases:
https://github.com/Swatto86/HandleHunter/releases