Verifying File Integrity of an NI Offline Software Installer

Updated Nov 2, 2023

Environment

Operating System

  • Linux
  • Mac OS X
  • Windows

  • I need to verify file integrity of a previously downloaded offline installer for NI software package.
  • I am getting errors when installing NI software from an offline installation package and I need to rule out errors during download.
  • I am unsure if my installed software has been modified by any third party. How can I check this?
  • My NI software installation might have gotten corrupted due to disk I/O errors such as from a faulty hard disk and I want to manually check file integrity by comparing file MD5 or SHA1 hashes.

File integrity errors often occur during download via an unstable network connection or a faulty hard disk or file system. Malware and some utilities can also alter files on the data level and lead to errors during execution, data corruption, or unintended application behaviour.

To check if an NI software is unmodified, you can compare the file checksum or hash value of your file to a known reference, such as found on the NI homepage or a second PC with the same software. If you do not have access to another computer, please contact NI Technical Support.

To generate the file checksum using a common hash algorithm such as MD5 or SHA-256, please follow the steps below depending on your operating system.

Compare the returned value to a known reference. The checksum values for NI offline software can be found by clicking the Individual Offline Installer link (see screenshot) or in accompanying Readme text documents.

Windows 7 and up

  1. Open a Command Prompt by pressing Win + R and entering cmd
  2. Navigate to the directory containing the file in question by using the cd command, i.e. cd "C:\Program Files (x86)\National Instruments"
  3. Use the following commands to generate and show the MD5 or SHA-1 checksum for the exemplary file YourFile.exe
    • CertUtil -hashfile YourFile.exe MD5
    • CertUtil -hashfile YourFile.exe SHA256

Linux

  1. Open up a terminal (i.e. by pressing Ctrl+Alt+T, depending on your distribution) and navigate to the directory of the file you have downloaded using the cd command, e.g. cd ​​​​​​/usr/local/natinst/
  2. Use the md5sum and sha256sum utilities to calculate the MD5 and SHA256 checksums. They are part of the coreutils package which should be part of most common Linux distributions. Replace YourFile with the name of the file you wish to check:
    • md5sum YourFile
    • sha256sum YourFile

MacOS

  1. Open the Terminal app (Applications -> Utilities -> Terminal)
  2. Navigate to the directory of the file you have downloaded by using the the cd command, e.g. cd Users\<your user>\Library\Preferences\
  3. Enter the following commands to generate the checksum, replacing filename with the name of the file you wish to check:
    • md5 filename  
    • shasum -a 256 filename

Additional Information

The checksum is a signature that is generated from the binary structure of a file. A single changed bit in the file will lead to a different hexadecimal hash value. Hence, the hash value derived from a file can be used to verify data integrity by comparing to the hash value of the intact file.
 

NI provides MD5 and SHA-256 hashed checksums for offline installation packages available from the download section of the NI homepage. The NI Package Manager performs automatic hash checks on downloaded packages and can be used to repair defective NI software installations.