Hands off my files! — See what's locking your files or folders and free them right inside Windows Explorer's own conflict dialog.
Tired of "The action can't be completed because the file is open in another program" — especially for folders, where Windows won't even tell you which app is holding them?
HandsOff upgrades Explorer's native "File / Folder In Use" dialog in place:
- Names the culprit — Shows the exact app, executable, PID, and nested file holding a lock (even on folders).
- One-click unlock — Adds an inline Kill / Unlock button right next to Try Again.
- Auto-retries — Frees the lock and finishes your move, rename, or delete automatically.
Downloads the latest release, verifies SHA-256, installs into %LocalAppData%\HandsOff, and activates immediately in Explorer — no manual download needed.
Install / Update:
irm https://raw.githubusercontent.com/1Stalk/HandsOff/main/install.ps1 | iexUninstall:
irm https://raw.githubusercontent.com/1Stalk/HandsOff/main/uninstall.ps1 | iex- Download
HandsOff-*-win-x64.zipfrom Releases and extractHandsOff.exe+HandsOff.dllinto any folder. - Run
HandsOff.exeand click Install (works immediately, no Explorer restart needed). Use Uninstall or Reapply anytime.
- ~660 KB total — Pure native Win32 C++ (
HandsOff.exe~352 KB +HandsOff.dll~307 KB) with static CRT (/MT) and zero external runtimes or VC++ Redistributable dependencies. - Zero background bloat — No tray icon, no startup daemon, no idle CPU/RAM drain.
HandsOff.dllloads insideexplorer.exeand only scans when a file/folder lock actually happens. - On-demand elevation — If an elevated process holds the lock,
HandsOffSvcstarts for that single unlock and shuts right back down. - Works on folders, too — Shows the locking app, executable, PID, and the exact nested file keeping a directory busy.
- Clean toggle — Hot-injects and hot-unloads from
explorer.exewithout restarting your shell.
For scripting or inspecting locks directly from a terminal:
.\HandsOff.exe install
.\HandsOff.exe uninstall
.\HandsOff.exe scan "D:\Path\To\Target"
.\HandsOff.exe unlock "D:\Path\To\Target" # close handles without killing the app
.\HandsOff.exe kill "D:\Path\To\Target" # terminate locking apps & close handlesRequires Visual Studio 2022 Build Tools (MSVC x64) and CMake 3.20+.
powershell -ExecutionPolicy Bypass -File .\build.ps1 -Werror -TestOutputs HandsOff.exe and HandsOff.dll to the project root and runs the CTest suite.
- Hook (
file_in_use_hook.cpp) — Interceptswindows.storage.dll!GetInfoForFileInUseand returns a customIFileIsInUseimplementation populated with lock details. - Scanner (
lock_finder.cpp) — Resolves lockers across running executables, the Windows Restart Manager API, and NT kernel handles (NtQuerySystemInformation) with a timeout-safe path resolver. - Dialog (
dialog_enhancer.cpp) — SubclassesOperationStatusWindow, embeds the inline action button, and clicks Try Again automatically after unlocking.
├── CMakeLists.txt CMake & CTest build configuration
├── build.ps1 Release x64 build & CTest helper
├── install.ps1 One-line user installer (GitHub Releases + SHA-256)
├── uninstall.ps1 One-line uninstaller & Explorer cleanup script
├── src/
│ ├── common.h Shared constants, IPC structs, and path helpers
│ ├── lock_finder.h / .cpp 3-stage lock scanner, handle closer, and process terminator
│ ├── file_in_use_hook.h / .cpp GetInfoForFileInUse hook and IFileIsInUse implementation
│ ├── dialog_enhancer.h / .cpp OperationStatusWindow subclass and inline action button
│ ├── dllmain.cpp COM shell extension exports and hot-unload lifecycle
│ ├── hands_off.def DLL export definitions
│ ├── gui.h / .cpp Minimal Win32 status & patch manager window
│ └── main.cpp CLI, Explorer hot-inject/unload, and --service pipe server
└── tests/
├── handsoff_tests.cpp CTest unit, lock-finder, and hook prologue compatibility suite
└── e2e/
├── run_e2e.ps1 Interactive Explorer UI Automation E2E suite (7 cases)
└── run_sandbox_e2e.ps1 Windows Sandbox wrapper for isolated E2E runs
Pull requests and issues are welcome — see CONTRIBUTING.md for build & test instructions.
| OS | Version | Build | Locale | Environment | Result |
|---|---|---|---|---|---|
| Windows 11 Pro for Workstations / Enterprise | 24H2 | 26100.9457 (x64) |
en-US |
Host + Windows Sandbox | Pass (7/7 E2E) |
| Windows 11 Pro | 23H2 | 22631.3880 (x64) |
ru-RU |
Hyper-V VM | Pass (7/7 E2E) |
| Windows 10 Pro | 22H2 | 19045.5487 (x64) |
ru-RU |
Hyper-V VM | Pass (7/7 E2E) |
| Windows Server 2022 & 2025 | CI Runners | Server 2022 / 2025 (x64) |
en-US |
GitHub Actions CI | Pass (Build + CTest + CLI) |
