Determine if files are identical with md5deep – using windows explorer right click

There are many ways to validate file integrity. A hash value (aka checksum) is a unique value that is generated when running data through a cryptographic function algorithm. The hash value is intended to always remain the same when running the exact same data through the algorithm again. Hence comparing the hash values of two different files on your computer allows you to determine if they contain the same data.

In this post I’m sharing one way to validate checksum using md5, sha1, sha2, tiger tree hash (tth) and whirlpool in windows explorer using some edits to the registry.

The followind registry edits are tested on Windows 7 and Windows 8.1.

Example situation – identical copies or not?

In this situation we want to compare two files test1.jpg and test2.jpg. These files have the exact same size and the exact same date. But, are they really identical copies?

EDIT: Please excuse the otherwise Swedish UI 🙂

md5

After we have retrieved both of the MD5 hash values we can compare them.

md5_2

test1.jpg gives d7e2edbee8f914de8cbcc1844b8eda48
test2.jpg
gives 53737dda0882af18f4f3d2d9c88a7f61

As we see, the files are not identical. If they were identical we would see the exact same value for both files.

Install

1. Download md5deep-3.1.zip or (mirror 1) (mirror 2)
MD5: d757e0984c1e2f1e2fd841809cad1625

The more recent versions works as well so you can replace the files with them if you want.

2. Extract md5deep.exe, sha1deep.exe, sha256deep.exe, tigerdeep.exe and whirlpooldeep.exe into your windows system folder (usually C:\Windows). Placing files in the windows system folder requires administrative access. (You need to log in as an administrator and probably temporarily lower UAC)

Placing these command line tools in the windows system folder enables them to be run using the command line from any path.

3. Backup your registry in case you mess something up. Either use Microsofts guide here or here or create a Windows System Restore point.

4. Copy the code from below and paste it into your favorite text editor (not MS word). Save as md5-rightclick-install.reg. Or download directly from here (You may have to right click and select save as.)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\_deepHash]
"SubCommands"="deepMD5Hash;deepTTHHash;deepSHA1Hash;deepSHA256Hash;deepWhirlp256Hash"
"MUIVerb"="Hash"
"Position"="-"
"Icon"="cmd.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepMD5Hash]
@="MD5"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepMD5Hash\command]
@="cmd.exe /k md5deep.exe \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepTTHHash]
@="Tiger Tree Hash"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepTTHHash\command]
@="cmd.exe /k tigerdeep.exe \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA1Hash]
@="SHA1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA1Hash\command]
@="cmd.exe /k sha1deep.exe \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA256Hash]
@="SHA256"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA256Hash\command]
@="cmd.exe /k sha256deep.exe \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepWhirlp256Hash]
@="Whirlpool"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepWhirlp256Hash\command]
@="cmd.exe /k whirlpooldeep.exe \"%1\""

5. Double click on md5-rightclick-install.reg and you will see a message asking you to confirm the registry changes.

6. Done! If performed correctly you should now see the “Hash” command when right clicking files.

Uninstall

1. Copy the code from below and paste it into your favorite text editor (not MS word). Save as md5-rightclick-uninstall.reg. Or download directly from here (You may have to right click and select save as.)

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\_deepHash]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepMD5Hash]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepTTHHash]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA1Hash]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepSHA256Hash]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\deepWhirlp256Hash]

2. Double click on md5-rightclick-uninstall.reg and you will see a message asking you to confirm the registry changes.

3. Manually delete md5deep.exe, sha1deep.exe, sha256deep.exe, tigerdeep.exe and whirlpooldeep.exe from your windows system folder

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s