LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inifile created by the application builder

Why is an almost empty ini file (with the same name as the executable) always created in the installation folder when installing a labview program created with the application builder?

I want to distrubute my own inifile with the installer but it seams that it is overwritten. I have one other file copied into the installation folder by the installer and it is installed just fine. Any suggestions? Do I have to change my inifile name (don´t want that)?

/ Roine

0 Kudos
Message 1 of 7
(2,995 Views)
If the executable name is "myname.exe", then should be called myname.ini and the first line of it must  
 contain
 
[myname]
.
.
.
 
 
The ini file she be included as a support file when building the application
0 Kudos
Message 2 of 7
(2,985 Views)

My selfmade inifile has the correct format as it starts with:

 [xxxxxxx]
.
.
.

Everything works when my inifile is copied manually to the installation folder overwriting over the one created by the application builder. No problems there. I will try to add my selfmade infile to "support files" instead of "Installation Destination Settings" and see if that helps.

/R

0 Kudos
Message 3 of 7
(2,978 Views)

Hello!

Here you have some more information that you might find helpful when it comes to *.ini files and executables created in LabVIEW:

Setting LabVIEW Preferences For a Windows Executable
http://digital.ni.com/public.nsf/websearch/65f76f247012df68862562c70073be06?OpenDocument

How Do I Prevent Automatic Creation of an INI File in Windows Start Directory when I Run a LabVIEW Executable from the Same Directory?
http://digital.ni.com/public.nsf/websearch/40E442486D81582E86256D16004D5D07?OpenDocument

Will My Application's .ini File Be Overwritten When I Run My LabVIEW Stand Alone Executable?
http://digital.ni.com/public.nsf/websearch/680ADAAD4A2E97F586256DC80074B471?OpenDocument

Regards,

Jimmie A.

Applications Engineer, National Instruments

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 4 of 7
(2,961 Views)

Thanks for the suggestions Jimmie, but none of the links aided me in the quest to let the msi installer copy my own inifile to the directory where the executable is installed. I´m using the option "files" in the installer tab of the "Build application or shared library" dialog.

I can have the inifile copied to \installdir\subdir but not to the \installdir as I guess that it is then overwritten by the empty inifile created by the installer. I know that there are several ways around this problem such as manual copy or perhaps copying with the aid of a batch file, but it would really be nice if the inifile could be copied by the installer to the right place!



0 Kudos
Message 5 of 7
(2,952 Views)

When you  build an executable,  under   Source Files Tab,

Press the    Add Support File       and locate the ini file.

The installer created will have the information about the support file.  When you setup the application, the ini file will be automatically created in the support file directory.  I usually set the support file directory to be the same as that of the executable.

If this is not working for  you, you must be doing something wrong.

0 Kudos
Message 6 of 7
(2,948 Views)
Many thanks for the more detailed suggestion Dr. Imad!  It now works as expected with a little bit of modification (I´m using LV 7.1)

1. Add the inifile you want to copy to the executable directory (with the msi installer) as a support file.
2. Edit "custom destinations" for the inifile, remove the ending "support" directory.
3. In "Installer settings" tab, select "files" and remove the "support" directory there to.
4. Build and install.

I still think that the installer or build configuration contains a bug as it should be enough to include the infile in the "Installer settings -> files" dialog. The option works with all destinations except the one where the executable is created. If the data.cab file is examined (with winrar for example), there is both the auto generated empty inifile and the ini file that I created. I can only guess that my inifile is written to the executable directory and then overwritten with the auto generated file.....

The working data.cab file does only contain one inifile and thus, cant be overwritten!


0 Kudos
Message 7 of 7
(2,935 Views)