09-03-2024, 02:04 AM
Comprehensive List of Handle Commands with Descriptions
**Handle** is a command-line utility from Sysinternals that provides detailed information about open handles for any process in a Windows system. Below is a detailed list of Handle commands, along with descriptions and examples.
1. Display All Open Handles
Description: Lists all open handles in the system.
Example: To display all open handles in the system:
2. Filter Handles by Process Name
Description: Lists all open handles for a specific process by name.
Example: To display all open handles for the `notepad.exe` process:
3. Filter Handles by Process ID (PID)
Description: Lists all open handles for a specific process by its PID.
Example: To display all open handles for the process with PID 1234:
4. Close a Specific Handle
Description: Closes a specific handle, typically used to release locked files.
Example: To close the handle `0x1234` for the process with PID 1234:
5. Filter Handles by Type
Description: Lists all handles of a specific type (e.g., File, Registry, Event) across all processes.
Example: To list all file handles in the system:
6. Search for Handles to a Specific File or Object
Description: Searches for handles that are accessing a specific file or object path.
Example: To find which processes have a handle open to `C:\Temp\file.txt`:
7. Display Handle Information with Details
Description: Displays detailed information about each handle, including the type, access, and object information.
Example: To display detailed information for all handles:
8. Show Handle Numbers in Hexadecimal Format
Description: Displays handle numbers in hexadecimal format, which is useful for closing specific handles.
Example: To display handle numbers in hexadecimal format:
9. List Handles for a Specific Object Type
Description: Lists all handles of a specific object type, such as `File`, `Mutant`, or `Section`.
Example: To list all `Mutant` (mutex) handles:
10. Show Only Handles with Specific Access Rights
Description: Displays only handles that have specific access rights, such as `READ` or `WRITE`.
Example: To display handles with `WRITE` access rights:
11. Display Help Information
Description: Displays help information for the Handle command, listing all available options and their descriptions.
Example: To display help information for Handle:
Conclusion
The **Handle** command is a powerful utility for managing and inspecting open handles on a Windows system. By mastering these commands, you can efficiently troubleshoot locked files, diagnose system issues, and manage process resources.
Happy Troubleshooting!
**Handle** is a command-line utility from Sysinternals that provides detailed information about open handles for any process in a Windows system. Below is a detailed list of Handle commands, along with descriptions and examples.
1. Display All Open Handles
Description: Lists all open handles in the system.
Code:
handle.exe
Code:
handle.exe
2. Filter Handles by Process Name
Description: Lists all open handles for a specific process by name.
Code:
handle.exe [ProcessName]
Code:
handle.exe notepad.exe
3. Filter Handles by Process ID (PID)
Description: Lists all open handles for a specific process by its PID.
Code:
handle.exe -p [PID]
Code:
handle.exe -p 1234
4. Close a Specific Handle
Description: Closes a specific handle, typically used to release locked files.
Code:
handle.exe -c [Handle] -p [PID]
Code:
handle.exe -c 0x1234 -p 1234
5. Filter Handles by Type
Description: Lists all handles of a specific type (e.g., File, Registry, Event) across all processes.
Code:
handle.exe -t [Type]
Code:
handle.exe -t File
6. Search for Handles to a Specific File or Object
Description: Searches for handles that are accessing a specific file or object path.
Code:
handle.exe [ObjectPath]
Code:
handle.exe C:\Temp\file.txt
7. Display Handle Information with Details
Description: Displays detailed information about each handle, including the type, access, and object information.
Code:
handle.exe -v
Code:
handle.exe -v
8. Show Handle Numbers in Hexadecimal Format
Description: Displays handle numbers in hexadecimal format, which is useful for closing specific handles.
Code:
handle.exe -x
Code:
handle.exe -x
9. List Handles for a Specific Object Type
Description: Lists all handles of a specific object type, such as `File`, `Mutant`, or `Section`.
Code:
handle.exe -t [ObjectType]
Code:
handle.exe -t Mutant
10. Show Only Handles with Specific Access Rights
Description: Displays only handles that have specific access rights, such as `READ` or `WRITE`.
Code:
handle.exe -a [AccessRights]
Code:
handle.exe -a WRITE
11. Display Help Information
Description: Displays help information for the Handle command, listing all available options and their descriptions.
Code:
handle.exe -?
Code:
handle.exe -?
Conclusion
The **Handle** command is a powerful utility for managing and inspecting open handles on a Windows system. By mastering these commands, you can efficiently troubleshoot locked files, diagnose system issues, and manage process resources.
Happy Troubleshooting!