Are you sure it works? i get cmd window, nothing in clipborad Code: SHA1 hash of file Command_Hash.reg: be f2 1b f3 59 b2 1d 03 21 f2 df e5 96 66 ed 4f 0e ee 83 a2 CertUtil: -hashfile command completed successfully. Press any key to continue . . .
The command was extensively tested but I didn't expect this case. Somehow your certutil inserted space characters between each byte. Here is a fix. Code: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\*\shell\hash] "MUIVerb"="Hash" "SubCommands"="" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\1MD5] "MUIVerb"="MD5" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\1MD5\command] @="cmd /c @echo off&(for /f \"tokens=*\" %%a in ('certutil -hashfile \"%1\" MD5') do echo %%a&for /f \"delims=\" %%b in ('echo %%a^|findstr /r /i /x \"[0-9A-F ]*\"') do if \"%%b\" neq \"\" set \"x=%%b\"&echo %%x: =%%|clip&pause&exit)&pause" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\2SHA1] "MUIVerb"="SHA1" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\2SHA1\command] @="cmd /c @echo off&(for /f \"tokens=*\" %%a in ('certutil -hashfile \"%1\" SHA1') do echo %%a&for /f \"delims=\" %%b in ('echo %%a^|findstr /r /i /x \"[0-9A-F ]*\"') do if \"%%b\" neq \"\" set \"x=%%b\"&echo %%x: =%%|clip&pause&exit)&pause" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\3SHA256] "MUIVerb"="SHA256" [HKEY_CURRENT_USER\Software\Classes\*\shell\hash\shell\3SHA256\command] @="cmd /c @echo off&(for /f \"tokens=*\" %%a in ('certutil -hashfile \"%1\" SHA256') do echo %%a&for /f \"delims=\" %%b in ('echo %%a^|findstr /r /i /x \"[0-9A-F ]*\"') do if \"%%b\" neq \"\" set \"x=%%b\"&echo %%x: =%%|clip&pause&exit)&pause"
I didn't know 7-zip could do that. Unfortunately 7-Zip doesn't automatically copy the result to the clipboard, but you can do it manually by placing the cursor in the results window, and then Ctrl-C and the the window's info *is* then copied to the clipboard. Thanks for the neat tip.
Thanks for the tip. I did not know you could copy it by simply placing our cursor in the window and hitting Ctrl+C. I had tried to highlight the text and right-clicking or Ctrl+C but never could highlight it. Always thought it was puzzling that you could not easily copy the hash (figured most folks used another program). -- This bit of info will make my life easier, so thanks.