LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXE build overwrites user ini file instead of adding its content (2009)

In older version of LabVIEW, we could use an ini file that would be the same as the one automatically generated by the build process.  Then, during the build, LabVIEW would add the fields it required to this file.  That would leave a nice neat single ini file for the application.

 

Now, during the build, LabVIEW copies our file over, then deletes it and replaces it with only the fields it thinks are needed.

 

Message 1 of 13
(4,131 Views)
So is it creating a bad INI file? Or is it simply replacing the ini file that has been changed with a new updated one from the installer?  The latter seems to me like the appropriate behavior for building an executable and in previous versions it was incorrect.  I can't find any documentation right away that talks about this behavior, but perhaps I misunderstand the situation.
0 Kudos
Message 2 of 13
(4,107 Views)

Let's say I'm building MyApp.exe.

 

In the past:

 

I included a file called MyApp.ini in the build setup to be included with a destination of the root directory of the build.  The LabVIEW app builder would copy this ini file over.  Then, the app builder would modify the ini file adding a [LabVIEW] section and a set of keys under it.

 

LabVIEW 2009:

 

Now, after it copies MyApp.ini over, it deletes it and replaces it with a new ini file that only includes the [LabVIEW] section.  Basically, not opening the ini file if it exists, but instead forcing a new one.

 

My concern is that NI will perceive this as a 'fix' of the previous version; when, in fact, it was a nice feature allowing you to have one ini file for your application.

0 Kudos
Message 3 of 13
(4,101 Views)
Does it delete and replace the ini file every time the exeruns or just after install?
David
www.controlsoftwaresolutions.com
0 Kudos
Message 4 of 13
(4,090 Views)
What version are you using that has the behavior you like?
George M
National Instruments
0 Kudos
Message 5 of 13
(4,081 Views)

I believe I just saw that issue in LV 2009 abou two weeks ago.

 

THe ini is included as part of the build spec and what I had in there got stepped on.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 13
(4,076 Views)

It only deletes it during the build process.  Afterward, we've just been copying over the ini file and everything works fine.

 

I believe everything up through 8.6 acted one way.  Only in 2009 have we found this to be an issue.  I know we used this technique going back to 7, maybe 6.1. or 6.  It's been so long that I haven't even thought to question the way we do it.

Message 7 of 13
(4,072 Views)
I would call support and report this as a bug and include an example set of code (including the custom INI file).
George M
National Instruments
0 Kudos
Message 8 of 13
(4,064 Views)

Im glad you have pointed this one out as I have recently started to use 2009 to create my installers.

 

Normally in my installations I only add files that have default values and are not critical to my application, all other files I include in a support folder on the install disc and run the install from a setup.bat file. This way I can call the installer and add/delete any files programmatically once the installer has completed.

 

 

David
www.controlsoftwaresolutions.com
0 Kudos
Message 9 of 13
(4,045 Views)
Is a CAR filed? Can you post the car number for our reference?
0 Kudos
Message 10 of 13
(3,994 Views)