Saturday, December 27, 2014

Windows File Integrity Checker like sha1sum on Linux

Why doesn't Windows have a built in file integrity checker like sha1sum on Linux. You'd think this would be pretty important - for example when verifying the integrity of Windows and Microsoft product updates.

There is a tool you can download called:

Microsoft File Checksum Integrity Verifier

I see that it has no provided checksum :) Of course what would you use to check it? You'd possibly have to pull out your Linux machine. (not funny?)

http://www.microsoft.com/en-us/download/details.aspx?id=11533 

To check a file:

1. Download the app.
2. Extract to desired folder
3. Add that folder to your PATH environment variable (search on this if you don't know how)
4. Open new command prompt window.
5. Navigate to file you want to check
6. Type fciv.exe to get output with all options
7. Type this to get sha1 hash of your desired file

fciv.exe <file> -sha1

8. Compare that hash you just created to the hash provided by the site where you downloaded the software

I noticed there was a -v option to verify a file and compare to it's hash. Seems to require an XML file which I tried but failed to read my file so I just compared the two manually since it was a short value. Would be better if they had a tool that worked more like sha1sum on linux, that takes a text file with the key as input.