Support
Display file hash (MD5, SHA1 - SHA512) via right-click menu

Display file hash (MD5, SHA1 - SHA512) via right-click menu

The below code is a reg file I created to capture the hash value of a file via PowerShell and then display the hash value in notepad. While you can certainly remove or add to it, I believe the 5 below are sufficient for now.  

The menu is titled Show Hash. The options are SHA1, SH256, SHA384, SHA512, and MD5. The notepad file (test.txt) is deleted once it is opened.

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu]
"MUIVerb"="Show Hash"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd1]
@="SHA1"
"AttributeMask"=dword:00000001
"AttributeValue"=dword:00000001
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd1\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA1 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd2]
@="SHA256"
"AttributeMask"=dword:00000001
"AttributeValue"=dword:00000001
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd2\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA256 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd3]
@="SHA384"
"AttributeMask"=dword:00000001
"AttributeValue"=dword:00000001
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd3\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA384 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd4]
@="SHA512"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd4\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA512 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd5]
@="MD5"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\*\shell\MyMenu\shell\cmd5\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm MD5 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu]
"MUIVerb"="HashMenu"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd1]
@="SHA1"
"AttributeMask"=dword:00000001
"AttributeValue"=dword:00000001
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd1\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA1 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd2]
@="SHA256"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd2\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA256 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd3]
@="SHA384"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd3\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA384 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd4]
@="SHA512"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd4\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm SHA512 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"


[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd5]
@="MD5"
"AttributeMask"=dword:00000002
"AttributeValue"=dword:00000002
"ImpliedSelectionModel"=dword:00000000

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\MyMenu\shell\cmd5\command]
@="powershell -WindowStyle Minimized -command get-filehash -literalpath '%1' -algorithm MD5 | fl | clip ; Get-Clipboard > test.txt; notepad test.txt; Start-Sleep 1; Remove-Item test.txt"