Step-by-Step Guide to Creating and Editing a Windows Installer
- Updated2023-02-21
- 10 minute(s) read
This topic provides a detailed guide to creating and editing a Windows installer in LabWindows/CVI. It also provides troubleshooting information. However, this topic does not describe every option in each tab of the Edit Installer dialog box. Click Help in the Edit Installer dialog box for complete dialog box help. For more information about distributing LabWindows/CVI applications, refer to the Distribution Overview.
Complete the following steps to create and edit a Windows installer:
- Open the LabWindows/CVI workspace that contains the projects you want to distribute. Then select Build»Distributions»Manage Distributions to open the Manage Distributions dialog box.

Note If projects in the current workspace include distribution kits from LabWindows/CVI 7.1 and earlier, LabWindows/CVI displays a dialog box that gives you the option to convert these distribution kits to .cds files. If you choose not to convert the distribution, LabWindows/CVI does not display this dialog box again unless the project is saved again in LabWindows/CVI 7.1 or earlier. - In the Manage Distributions dialog box, you can create a new distribution or add an existing distribution to the current workspace. To add an existing distribution, click Add and select an existing .cds file. To create a new distribution, click New to open the New Distribution dialog box. Specify the Name, Type, and Settings file for the new installer. The Name you specify is used only to identify this distribution; it is not displayed in the installer you build.
The settings (.cds) file contains the information LabWindows/CVI uses to build the installer. You can share .cds files between workspaces. By default, LabWindows/CVI saves the .cds file in the directory in which the workspace file is saved. You cannot specify an existing .cds file as the Settings file in the New Distribution dialog box. To copy the settings from an existing file, enable the Copy settings from existing file option and browse to the file. - Click OK to exit the New Distribution dialog box. LabWindows/CVI launches the Edit Installer dialog box automatically. By default, LabWindows/CVI adds the project output, project DLL dependencies (if there are any), and any other project files (excluding .h, .c, .fp, and .lib files) to the installation. LabWindows/CVI also creates a shortcut for the installed application and installs the LabWindows/CVI Runtime by default. Use the Edit Installer dialog box to customize the installer.
When you specify all the necessary options in the Edit Installer dialog box, click OK to return to the Manage Distributions dialog box. Use the Edit Installer dialog box to customize the installer. The following points highlight important options in the Edit Installer dialog box. For complete dialog box help, click Help in the dialog box.
VersioningUse the Upgrade behavior options in the General tab to specify versioning information for the installer.
A Globally Unique Identifier (GUID) assigned to the distribution ensures proper upgrade behavior. The GUID is assigned when LabWindows/CVI creates the distribution and is not directly accessible. National Instruments recommends that you leave the Auto-increment option enabled. When you enable this option, LabWindows/CVI increments the version number each time you successfully build the installer. If you disable this option, always use a version number for the current installer build that is higher than the version number for previous builds. If you run the installer on a computer that has a previous installation of the application, the version numbers determine the installer behavior. If the previous installation has a lower version number, that installation is completely removed and the new installation replaces it. If the previous installation has a higher version number, the installer completes without making any changes.
Note You can specify the versioning information only for complete distributions, not distribution patches.
To create side-by-side installations for an application, select the Side-by-side (do not upgrade) option. To use the same settings in two distributions, enable the Copy settings from existing file option in the New Distribution dialog box.
Including Files in the InstallerThe folder in bold font in the Destinations tree is the application directory. During the installation, the user has the option to move this directory and the files and directories it contains to a different path. To set the application directory, right-click a folder and select Set as Application Directory.
By default, LabWindows/CVI adds the project output, project DLL dependencies, and any other project files (excluding .h, .c, .fp, and .lib files) to the application directory of the installation. The Project Name DLL Dependencies item lists DLLs that the LabWindows/CVI linker detects are required for the project. These dependencies typically result when the project includes import libraries or instrument drivers that are associated with DLLs. If LabWindows/CVI does not detect any required DLLs, LabWindows/CVI does not list any DLLs and the size for this item is zero. The Project Name Output item represents different files, which depend on the project target type, as follows:
Note Do not install DLLs for NI components manually. Instead, use the Drivers & Components tab, which ensures that the installer you are creating supports upgrades and does not uninstall needed files. - If the target type is executable, Project Name Output is the .exe file.
- If the target type is DLL, Project Name Output is the DLL and import library.
- If the target type is static library, Project Name Output is the .lib file.
- If you create a new shortcut, you must specify both the Target File and Destination Directory in the Shortcuts tab. If you do not specify these items, LabWindows/CVI removes the shortcut when you click OK.
- You can specify shortcuts only for complete distributions, not distribution patches.
- In the Mange Distributions dialog box, right-click the installer and select Build. If the build fails, troubleshoot the installer using the instructions at the bottom of this page.
- When LabWindows/CVI finishes building the installer, click Close. You now can install the application.
Launching a File after Installation
To launch a file automatically after installation, right-click the file in the Destinations browser in the Files tab, select File Options, and enable the Launch after Installation option. The application is launched with the application associated with its file type on the target computer.
Creating Shortcuts
By default, LabWindows/CVI includes a shortcut for the project output under the [Start»Programs] directory. If you want to specify another directory for shortcuts, you must create the directory in the Destinations tree in the Files tab.
![]() |
Note
|
Including Drivers and Components for NI Products
Use the Drivers & Components tab to add NI drivers or support products that the application uses.
The drivers and components for NI products that you include in the installer contain only those features that are installed on the computer on which you build the installer. For example, if you have only 10 of a possible 20 features of an NI product installed on the build computer and then select to include the full version of that product in the installer, the installer might include only the 10 features installed on the build computer, not all 20 features available for that product.
![]() |
Caution It is possible that running an installer you create in LabWindows/CVI could uninstall certain features of NI products without reinstalling updated versions of those features. This behavior depends on the features installed on the build computer and those installed on the target computer. If the installation upgrades an NI product on the target computer, it may remove features of that product that were present on the target computer but not present on the build computer. The installer displays information to the user that explains what features will be removed as part of the installation before uninstalling any products and gives the user the option to stop the installation. |
An installer will not downgrade an NI product. If you have one version of an NI product installed on the build computer and a higher version of that product installed on the computer on which you run the installer, the installer will not replace the higher version of the product with the version on the build machine.
Adding Registry Keys
Use the Registry Keys tab to add registry keys as part of the installation. To create a new key, right-click the hive key under which you want to add the registry key and select New Key. To edit the default value for the key, right-click (Default) in the values table and select Edit Value. To create a new named value, right-click the values table and select New Value.
Including a Hardware Configuration
Enable the Import Measurement & Automation Explorer Configuration File option in the Advanced tab to provide the path to an NI Measurement and Automation Explorer (MAX) hardware configuration file and import the file as part of the installation.
![]() |
Note You can include a hardware configuration file only for complete distributions, not distribution patches. |
Specifying Distribution Media Size
Use the Distribution media size (in MB) option in the Advanced tab to specify the size of the media on which you plan to distribute the installer.
![]() |
Note You can specify the distribution media size only for complete distributions, not distribution patches. |
LabWindows/CVI attempts to divide the installation parts into Volume folders so that no Volume folder is larger than the size you specify. The media size cannot be smaller than any individual .msi file in the installer. A basic installation for a LabWindows/CVI application that includes the full LabWindows/CVI Runtime but does not use other NI products is approximately 20 MB. However, if you use additional NI products in the application, which require you to add additional drivers and components, the installer size can increase greatly.
For more information about each of the tab options in the Edit Installer dialog box, refer to the following resources:
General Tab
Files Tab
Shortcuts Tab
Drivers & Components Tab
Registry Keys Tab
Advanced Tab
Troubleshooting
When you build a distribution, LabWindows/CVI displays the Building Distribution dialog box to show the build progress. This dialog box also displays diagnostic messages, allowing you to debug settings and fix any issues. For example, a build can fail if you include a file in the build that is not present on your computer. LabWindows/CVI marks missing files with red text, including missing files on the Files tab of the Edit Installer dialog box and in other locations, such as the Your readme file or Your license agreement file fields on the General tab of the Edit Installer dialog box. Refer to Distribution Errors and Warnings for more information about Building Distribution dialog box messages.
