Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhyLocked

Can't delete, move, or rename a file? Drop it into WhyLocked and see which app is holding it.

中文说明 · Download · ConfigCrate

WhyLocked is a small, focused Windows utility. It uses the Windows Restart Manager API to identify applications using a selected file. There are no drivers, background services, accounts, uploads, or administrator prompts.

WhyLocked showing the application that holds a file

What it does

  • Drag in a file or folder and inspect it immediately.
  • Show the locking app, process ID, publisher, and executable location.
  • Request a normal app close when Windows exposes a safe main window.
  • Never force-kill a process.
  • Protect Windows system processes, Explorer, and WhyLocked itself from close actions.
  • Inspect up to 2,000 files when a folder is selected.
  • Follow the Windows display language (Chinese or English), with a manual language switch.
  • Run as one portable .exe; nothing is installed.

Use

  1. Download the latest Windows ZIP from Releases. Version 0.1.3 includes the icon-position and high-DPI layout fixes.
  2. Extract it and run whylocked.exe.
  3. Drag in the file or folder that Windows will not delete, move, or rename.
  4. Save work in the listed app, close it, and select Check again.

You can also pass a path directly:

whylocked.exe "C:\path\to\busy-file.docx"

Safety and privacy

  • All inspection happens locally.
  • WhyLocked never reads or uploads file contents.
  • It registers file paths temporarily with the built-in Windows Restart Manager API.
  • Close app normally sends the same polite close request as clicking an app's × button. The app can still ask you to save work or refuse to close.
  • WhyLocked deliberately provides no force-kill or delete button.
  • A clean result only means no Restart Manager-compatible locking application was found. Permissions, antivirus software, sync tools, or file-system errors can also prevent file operations.

Scope

WhyLocked intentionally solves one problem. If you want a broad Windows utility suite, Microsoft PowerToys includes File Locksmith and many other tools. WhyLocked is for people who want a portable, focused explanation without installing a suite.

WhyLocked is independently implemented and is not affiliated with Microsoft or PowerToys.

Build and test

Windows includes the .NET Framework compiler used by the build script:

.\scripts\build.ps1
.\scripts\build.ps1 -Release

The tests create a real exclusive file lock and verify detection through Restart Manager.

中文说明

文件删不掉、移动不了或无法重命名?把它拖进 WhyLocked,马上看看是哪个程序占用了它。

WhyLocked 是一个专注解决单一问题的 Windows 小工具。它使用 Windows 自带的 Restart Manager 接口查找文件占用程序,不安装驱动、不常驻后台、不上传文件,也不要求管理员权限。

功能

  • 拖入文件或文件夹后立即检查。
  • 显示占用程序、PID、发布者和程序位置。
  • 仅在程序具有普通窗口时提供“正常关闭程序”。
  • 不会强制结束任何进程。
  • 系统进程、Windows资源管理器和 WhyLocked 本身禁止关闭。
  • 选择文件夹时可检查其中最多2,000个文件。
  • 跟随 Windows 中英文显示语言,也可手动切换。
  • 单文件便携运行,不需要安装。

使用方法

  1. 从 Releases 下载最新 Windows 压缩包。
  2. 解压并运行 whylocked.exe。
  3. 把删不掉、移动不了或无法重命名的文件拖进去。
  4. 保存占用程序中的工作,正常退出程序,再点击“重新检查”。

安全说明

  • 所有检查均在本地完成,不会上传或读取文件内容。
  • “正常关闭程序”相当于点击程序窗口右上角的关闭按钮,程序仍然可以提示保存或拒绝退出。
  • WhyLocked 故意不提供强制结束和删除功能。
  • 如果没有查到占用程序,仍可能是文件权限、同步软件、杀毒程序或文件系统错误造成的。

WhyLocked 由 ConfigCrate 独立实现,与 Microsoft 或 PowerToys 没有关联。

Built by ConfigCrate.

About

A focused Windows utility that tells you which app is holding a file open.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages