How to Deploy the LabWindows™/CVI™ Runtime Privately

Updated Dec 22, 2017

Reported In

Software

  • LabWindows/CVI Full

Issue Details

I am creating an installer using LabWindows™/CVI™ to deploy my application. I would like to install the LabWindows/CVI Runtime dependencies for my application privately, or in other words, next to my deployed application. However, I am unable to do this when using National Instruments runtime installers listed on the NI Drivers & Components tab of the LabWindows/CVI installer editor. Is there a way to manually deploy the LabWindows/CVI Runtime using the LabWindows/CVI installer editor?

Solution

While NI recommends that customers use the runtime installers on the NI Drivers & Components tab for distributing runtime components, this may not work for everyone. In certain cases, you may deploy your application by manually selecting dependencies to deploy alongside your application. The following sections assume you have created an installer project for your application using the LabWindows/CVI installer editor. 

Knowing your application’s dependencies
Before deploying your application manually, you must know exactly which run-time components your application requires. Run-time components can be DLLs, configuration files, resource files, ActiveX servers, and more. This document discusses the run-time components you must deploy if your application only depends on the LabWindows/CVI Runtime, but beyond that, you will need to find any additional dependencies your application requires to be present on the system at run time. 

LabWindows/CVI run-time components
The LabWindows/CVI Runtime is contained within a single DLL called cvirte.dll, and it uses a resources directory called cvirte. In order to load, cvirte.dll requires that the cvirte directory be in an expected location in the run-time environment. To render UIs, LabWindows/CVI also uses a library called mesa.dll. 

Complete the following steps to deploy the LabWindows/CVI Runtime to the Application Directory:
  1. On the Files tab of the Edit Installer dialog in the Local Files & Directories tree, navigate to the [System32] directory which corresponds to the bitness of your application:
    • (64-bit OS)—SysWOW64 for 32-bit applications and System32 for 64-bit applications
    • (32-bit OS)—System32 for 32-bit applications
  2. In the Installation Files & Directories tree, select the bold Application Directory, and add cvirte.dll to its contents using the Add File button.
  3. In the Local Files & Directories tree, select the cvirte directory and add its contents to the Application Directory using the Add Contents button.
  4. In the Local Files & Directories tree, navigate to the <National Instruments Shared> directory. This directory is located by default at C:\Program Files (x86)\National Instruments\Shared\.
  5. Find the Mesa subdirectory and add mesa.dll to the Application Directory using the Add File button.
  6. Verify that cvirte.dll, mesa.dll, and the cvirte directory are in the Application Directory. Your Edit Installer dialog should appear similar to the following:

Any other run-time components
If your application relies on other run-time components that can be deployed privately, you must include them in your installer by following a similar process as described for the LabWindows/CVI Runtime. If the additional run-time components you are including in your installer are DLLs, make sure to deploy the DLLs where the Windows loader can find them, with respect to the location of your deployed application. For more information, see Dynamic-Link Library Search Order on microsoft.com.

WAS THIS ARTICLE HELPFUL?

Not Helpful