Have you come across file in use or similar errors when deleting a file or folder, or when clearing the contents of the %TEMP% folder at some time? Ever wondered which program has a particular file or folder open?
There is a great tool from Windows Sysinternals, named Process Explorer. Process Explorer shows you information about which handles and DLLs processes have opened or loaded. The article Know which process has locked a file has more information on that.
Wouldn’t it be nice to have the option in the context menu? Windows Sysinternals also has a command-line tool named Handle that displays information about open handles for any process in the system. By tweaking the registry, you can add Handle to the context menu for file system objects. The instructions are given below.
INSTRUCTIONS FOR WINDOWS XP
1. Download Handle.zip from Windows Sysinternals site.
2. Unzip the archive and move handle.exe to your Windows folder.
3. Download the file handle_xp.reg to your Desktop.
4. Right-click handle_xp.reg and choose Merge
5. Click Yes when prompted.
INSTRUCTIONS FOR WINDOWS VISTA
In Windows Vista, Handle.exe needs to be run under elevated user rights. For that reason, I created a small wrapper script that runs Handle.exe elevated (using ShellExecute – passing runas as a parameter.) when called from the context menu.
1. Download Handle.zip from Windows Sysinternals site.
2. Unzip the archive and move handle.exe to your Windows folder.
3. Download runhandle.vbs and save the file to your Windows folder.
4. Download the file handle_vista.reg to your Desktop.
5. Right-click handle_vista.reg and choose Merge.
6. Click Yes when prompted.
SCREENSHOTS

Fig 1: View Handles option in the context menu.

Fig 2: Wordview.exe has the .doc file open.
Bookmark this Page!
BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |
Related Posts
- View Hidden Items in the Send to Menu in Windows 7
- Open an Elevated Command Prompt From the Desktop Context Menu
- Add “Open File Location” To the Context Menu for Shortcuts in Windows XP
- A Bug in Windows XP File Types Dialog
- Adding the Run as Administrator Option for .VBS and .JS Files
- Add the “Open With Notepad” Context Menu Option for All File Types
- Add “Open in InPrivate Window” Option to the Right-Click Menu for Internet Shortcuts (.URL Files)
- Add “Edit HOSTS File” Option in the Context Menu
- Add “Explore” To the Desktop Context Menu in Windows Vista
- Register DLLs Elevated Using the Context Menu in Windows Vista
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?

› 