Verifying the integrity and authenticity of a file is a crucial step in software installation. It ensures your software files and ISO downloads are authentic and unaltered, preventing you from accidentally installing malware into your computer.
The only problem is that this task can be time-consuming, especially when done across multiple machines. You must open command prompts, navigate directories, and type in lengthy command lines to generate hash values.
To make the process easier, Windows 11 allows users to add a hash generator tool directly to the File Explorer Context Menu. This step enables them to calculate hashes with a simple right-click.
In this article, we’ll guide you through adding a hash value to the Context Menu in Windows 11 File Explorer.
Step-by-step guide: Adding a hash value to the Context Menu of Files in Windows 11
📌 Prerequisites:
- Operating System: Your computer should be running on Windows 11.
- Administrator Privileges: You need administrator rights to modify the Windows Registry.
- Command-line Program: The methods outlined below use the built-in tool certutil.exe for deployment.
📌 Recommended deployment strategies:
| Click to Choose a Method | 💻 Best for Individual Users | 💻💻💻 Best for Enterprises |
| Method 1: Via Registry | ✓ | |
| Method 2: Via a PowerShell script | ✓ | |
| Method 3: Via a .reg file | ✓ | ✓ |
⚠️ Warning: Editing the Registry will affect the Context Menu at the system level.
Method 1: Adding File Hash to the Context Menu via Registry
📌 Use Case: This method is best for power users comfortable with editing the Registry.
- Press Win + R, type regedit, and press Enter.
- Navigate to HKEY_CLASSES_ROOT\*\shell
- Create a new key named Hash with CertUtil.
- Inside the key, create a new String Value named Icon with the value: shell32.dll,-152
- Still under Hash with CertUtil, create a subkey named command.
- Set the default value of command to: cmd.exe /k certutil -hashfile “%1” SHA256
To check if the Hash has been successfully added to the File Explorer context menu, right-click on a file and look for the “Hash with CertUtil” option. Clicking it should open a window with the SHA256 hash of your selected file.
Method 2: Automating deployment using a PowerShell script
📌 Use Case: This option is most suitable for enterprise deployment via automation tools.
Utilize this deployment script, open the PowerShell console as an administrator and paste the text below:
reg.exe add "HKLM\SOFTWARE\Classes\*\shell\Hash with CertUtil" /f
reg.exe add "HKLM\SOFTWARE\Classes\*\shell\Hash with CertUtil" /v Icon /t REG_SZ /d "shell32.dll,-152" /f
reg.exe add 'HKEY_CLASSES_ROOT\*\shell\Hash with CertUtil\command' /ve /d 'cmd.exe /k certutil -hashfile \"%1\" SHA256' /f
💡 Tip: You can deploy this script manually or as a Group Policy logon action.
Method 3: Configuring using a .reg file
📌 Use Case: This method is ideal for small-scale deployments.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\HashWithCertUtil]
@="Hash with CertUtil"
"Icon"="shell32.dll,-152"
"Position"="Top"
; "Extended"="" ; uncomment to require Shift+right-click
[HKEY_CLASSES_ROOT\*\shell\HashWithCertUtil\command]
@="cmd.exe /c \"%SystemRoot%\\System32\\certutil.exe\" -hashfile \"%1\" SHA256"
Save the file as AddHashContext.reg and merge it to apply.
How to remove the Hash Tool from the Context Menu
If you want to remove the hash tool from the File Explorer Context Menu:
- Open the Registry Editor.
- Delete the key:
HKEY_CLASSES_ROOT\*\shell\Hash with CertUtil
You can also create a .reg file to delete the key for a quicker rollback.
⚠️ Things to look out for
Keep these pitfalls in mind when following our guide.
| Risks | Potential consequences | Reversal |
| Incorrect registry configuration | Adding the wrong keys to the Registry can cause system instability. | Back up your registry before making any changes. |
| Invalid registry paths and values | Errors in registry paths and incorrect values may cause commands to fail. | Manually verify your paths and values before continuing. |
| Running scripts with no administrative rights | Running a script or a .reg file | Make sure you’re signed in as an administrator before running a .reg file or a PowerShell script. |
Additional tips for adding a hash value in the Context Menu
You can use additional customization options to tailor the hash tool further.
- To calculate SHA1 or MD5, substitute SHA1 or MD5 for SHA256 in the command line.
- You need additional scripting (for example, clip.exe or PowerShell) to copy the result of your computation to the clipboard automatically.
- To add support for multiple hash algorithms, create separate menu entries for each hash value (for example, “Hash with SHA1”).
Make file verification easier by integrating a hash value option into the Context Menu in File Explorer
Adding a hash generator to the File Explorer Context Menu makes file verification easier by allowing users to generate hashes without external tools. What makes this feature even better is that you can customize its settings to your specific needs and goals.
Related topics:
