Deploy VISA Resource Settings in a LabVIEW Installer

Updated Jul 28, 2023

Environment

Software

  • LabVIEW

Driver

  • NI-VISA

Other

3rd party VISA device

I am developing code for a remote site and would like to build an installer for my LabVIEW application. I am using 3rd party VISA devices and would like to include my VISA resource settings in the installer. How can I do this?

There are two methods for including VISA resource settings in a LabVIEW installer. The recommended method is to include the NI MAX Hardware Configuration. An alternative method is to include visaconf.ini, the VISA configuration file, as a source file in the installer.

Method 1: Including the NI MAX Hardware Configuration (Recommended)
  1. Open your LabVIEW project. In the LabVIEW Project Explorer, open the Installer Properties dialog. If you already have a build specification for your installer, you can do this by right-clicking on it and selecting Properties. If not, you can create one by right-clicking on Build Specifications, and selecting New»Installer.
  2. Select the Hardware Configuration category.
  3. Enable the option to Include hardware configuration from MAX.

  4. Select Configure to create a hardware configuration file.
  5. Select the system whose settings you would like to export and the location for the configuration file. Select Next.
  6. Select which settings you would like to include in the configuration file. You can choose settings individually or choose the Check All or Check By Product options. If you choose Check By Product, you can choose to export only NI-VISA products.
  7. Select Export.
  8. Once the export completes, select Finish.
  9. Under Import Mode, select the installer behavior you would like. You can either choose to launch the MAX Configuration Import Wizard upon installation to have the user walk through importing this hardware configuration or have the import performed silently.
  10. Select OK to save your properties and close the Installer Properties window.
 

Method 2: Including visaconf.ini
  1. Open your LabVIEW project. In the LabVIEW Project Explorer, right-click on My Computer and select Add»File.
  2. Navigate to and select visaconf.ini. The location of this file will depend on your OS:
    • Windows Vista/7/8/10: C:\ProgramData\National Instruments\NIvisa\visaconf.ini.

      NoteProgramData is a hidden folder. To show hidden folders, please see how to do so here: Windows Show hidden folders.
       
    • Windows XP and earlier: C:\Documents and Settings\All Users\Application Data\National Instruments\NIvisa\visaconf.ini
       
  3. In the LabVIEW Project Explorer, open the Installer Properties dialog. If you already have a build specification for your installer, you can do this by right-clicking on it and selecting Properties. If not, you can create one by right-clicking on Build Specifications, and selecting New»Installer.
  4. Select the Destinations category in the Installer Properties dialog.
  5. Under Destination View, select the [Public App Data] folder, and select the Add destination button.
  6. Create a new folder named National Instruments.
  7. Select this new folder and again select the Add destination button. Create a new folder named NIvisaThe folder names must be spelled correctly in order for the installation to work properly. The destination settings should now look like the image below:

 

  1. Navigate to the Source Files category. In the Project Files View section on the left, select visaconf.ini. In the Destination View section on the right, select the NIvisa folder that you created in the Step 7. Click the Add arrow to add the visaconf.ini to the NIvisa destination folder. Your source file settings should now look like the image below:
     

  2. Select OK to save your properties and close the Installer Properties window.

Additional Information

After completing one of the methods above, your installer will now be configured to export the VISA resource settings. To build your installer, right-click on your installer in the Project Explorer and select Build. Your installer will be built to the Installer destination specified in the Installer Properties under the Product Information category.

Note: Because your application uses the NI-VISA driver, you will need to install at least the NI-VISA Run-Time Engine on the target machine. The VISA Run-Time Engine can be included in the installer

If you need more general information on building a LabVIEW installer, refer to Introduction to the LabVIEW Application Builder.