Combining a User-Created .ini File with LabVIEW.ini for Distribution

Updated Jan 13, 2023

Reported In

Software

  • LabVIEW Application Builder Module
  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I have a LabVIEW VI that I have built into an application. By default, LabVIEW creates an .πš’πš—πš’ file which has the same name as the executable π™΄πš‘πšŽπšŒπšžπšπšŠπš‹πš•πšŽ π™½πšŠπš–πšŽ.πš’πš—πš’ to store the LabVIEW environmental settings for distribution, as shown in the photo below. I also have my own custom configuration file, which I would like to combine with the default LabVIEW .πš’πš—πš’ file. Is there a method for combining the two files?

Solution

You can use Application Builder to combine your custom .πš’πš—πš’ file with the default π™΄πš‘πšŽπšŒπšžπšπšŠπš‹πš•πšŽ π™½πšŠπš–πšŽ.πš’πš—πš’ file into a single .πš’πš—πš’ file. You must have your custom .πš’πš—πš’ file saved in the project in order to add it, as shown in the photo below.



Next, follow the steps below to accomplish combining the .πš’πš—πš’ files.
 
  1. Right-click on your executable build specification and select Properties.
  2. In the properties window, select the Advanced category.
  3. In the configuration file in project section:
3.1. For LabVIEW 2010 and later: Check Use Custom Configuration file            
3.2 Prior to LabVIEW 2010: Uncheck the box next to Use the default LabVIEW Configuration file (LabVIEW.ini)


4. In the Select Project File dialog, either select the custom .πš’πš—πš’ file if it is in your project or click Add... to browse for it.
5. If you are using Configuration File I/O VIs from the palette below:

Ensure that all of your configuration file accesses within your application point to the new location which is at the same level as the executable, as shown below:
 
6. Rebuild the application.
7. Note the name of the π™΄πš‘πšŽπšŒπšžπšπšŠπš‹πš•πšŽ π™½πšŠπš–πšŽ.πš’πš—πš’ file generated from the build. You might need to rename the file generated to match the name of the .πš’πš—πš’ file referenced by your LabVIEW code in the π™Ύπš™πšŽπš— π™²πš˜πš—πšπš’πš π™³πšŠπšπšŠ.πšŸπš’ as shown above. After renaming the π™΄πš‘πšŽπšŒπšžπšπšŠπš‹πš•πšŽ π™½πšŠπš–πšŽ.πš’πš—πš’ file generated, the final result should look like this: 

Additional Information

On the deployed machine, the custom .πš’πš—πš’ file and the executable must be located at the same level in the directory structure because this is the default location where LabVIEW searches for the .πš’πš—πš’. If LabVIEW cannot find it in this location it will auto-generate a new .πš’πš—πš’ file and your environmental settings will be lost.