Subscribe to our RSS feed     Get daily updates in your mail box

View Open Handles to a file or folder from the context menu

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.

RELATED POSTS


Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |
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?

Enter your email address:

Delivered by FeedBurner

There Is 1 Response So Far. »

  1. [...] • Filed Under Add the “Open with Notepad” context menu option for all file typesView Open Handles to a file or folder from the context menuAdding the Run as Administrator option for .VBS and .JS filesAdd “Edit HOSTS file” [...]

Post a Response