The File Checksum Integrity Verifier (FCIV) is a free command-prompt utility from Microsoft that computes and verifies cryptographic hash values of files with support for MD5 or SHA-1 cryptographic hash values. The MD5 and SHA-1 checksum values generated by FCIV can be displayed on the screen to compare against known good value or saved in an XML file database for later use and verification.

Features of File Checksum Integrity Verifier (FCIV):

  • Supports MD5 or SHA1 hash algorithms (default is MD5).
  • Can output hash values to the console or store the hash value and file name in an XML file.
  • Can recursively generate hash values for all files in a directory and in all subdirectories (for example, fciv.exe c:\ -r).
  • Supplies an exception list to specify files or directories to hash.
  • Can store hash values in database for a file with or without the full path of the file.
  • FCIV can compare hash values to make sure that the files have not been changed.
  • Can run a verification of the file system files against the XML database to determine which files have been modified.
  • FCIV utility runs on Microsoft Windows 2000, Windows XP, Windows Vista, Windows 7, Windows Server 2003, Windows Server 2008 and Windows Server 2008 R2.

For user who interested to uses File Checksum Integrity Verifier can download the FCIV setup installer (KB841290) from Microsoft Download Center with direct download link: windows-kb841290-x86-enu.exe

Those who prefer a GUI user interface, there are several other file hash checksum calculators or tools available.

After downloading and installing FCIV, user will need to add a path reference to the directory when FCIV is installed so that FCIV can be called from anywhere else. Use the “set path” command to add a new folder to the path environment variable. For example, if FCIV is installed in C:\FCIV folder, type set path=%path%;c:\fciv to add it to the system path in a command shell. Alternatively, just install FCIV to %SystemDrive%\Windows\System32 folder. The path environment variable can also be set in Control Panel. Go to System Properties, and then Advanced tab. Click on Environment Variables button, and the path system variable can be edited to include the path to folder where File Checksum Integrity Verifier is installed. If user doesn’t specify the path to FCIV in environment variable, then the full path to fciv.exe has to be typed each time the command is run.

To use FCIV to calculate and generate MD5 or SHA-1 hash is easy. To display the MD5 hash of a file, type the following command at a command prompt:

fciv.exe path.to/filename

To display the SHA-1 hash of a file, use the folling command:

fciv.exe -sha1 path.to/filename

Generally, fciv.exe has the following syntax:

fciv.exe [Commands] <Options>

Commands supported by FCIV

  • -add file | dir: Compute the hash and send it to an output device (default screen). The dir parameter has the following options:
    • -r: Recursive.
    • -type: Specify file type. For example, -type *.exe.
    • -exc file: Do not compute these directories.
    • -wp: Do not store the full path name. (By default, FCIV stores the full path name.)
    • -bp: Remove the base path from the path name of each entry.
  • -list: List entries in the database.
  • -v: Verify hashes. The -v option has the following option:
    • -bp: Remove the base path from the path name of each entry.
  • -?, -h, or -help: Open extended help.

Options supported by FCIV

  • -md5, -sha1, or -both: Specify hash type. (By default, MCIV uses -md5.)
  • -xml db: Specify database format and name.

As FCIV supports storing of hashes of various files in database in XML format, thus it can be used to verify the integrity of files over time. Here’s a few commands that can be used to verify the hash values for the files in the Windows directory and in all sub-directories. To verify personal sensitivve files, just change the path to the folder accordingly.

Create the database and to save it to the C:\Temp directory with the following command:

fciv.exe -add %systemroot% -r -XML c:\temp\windows-hashes.XML

List the contents of the database to the console with the following command:

fciv.exe -list -XML c:\temp\windows-hashes.XML

Verify the contents of the XML database against the current file system files with the following command:

fciv -v -XML c:\temp\windows-hashes.XML

When verifying and comparing the checksum of files against the hash values stored in database, FCIV will send a return error code to indicate whether a hash is verified. A zero (0) indicates success, and a 1 indicates failure. For more information and example usage of File Checksum Integrity Verifier, visit KB841290.

Related Posts