LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why is .ini file getting created when i run my EXE ?

whenever i run an EXE (say MyAPP.EXE) with LabVIEW software, it generates .ini file (MyAPP.ini). How to prevent this?
0 Kudos
Message 1 of 10
(3,906 Views)
The ini file maintains the preferences for the executable - it's like a portable Labview.ini file and is automatically created when the executable is built and is re-built if missing when the executable is run.

I'm pretty certain there is no way to avoid creating it.

For more info see: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/65f76f247012df68862562c70073be06?OpenDocument

To see what kind of settings you can specify, check out Renken's page:
http://labview.brianrenken.com/INI/


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 10
(3,904 Views)
Sandeep wrote:

> whenever i run an EXE (say MyAPP.EXE) with LabVIEW software, it
> generates .ini file (MyAPP.ini). How to prevent this?

You don't! No way to avoid it I guess other than installing your app in
a write protected directory.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 10
(3,904 Views)
I will buck the trend and say there IS a way to prevent the exe from CREATING the ini.

Copy your LV ini as the same name created by the exe and include it as a support file in your build.

The exe only creates the ini if is not there.

Sorry, but I could not resist!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(3,904 Views)
true true,
but in the end there still needs to be 2 files: the app and the ini.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 5 of 10
(3,904 Views)
Ben,

Here's another solution: closing the application with ExitProcess!

Regards,

Wiebe.


Note: win only, and not very nice..

"Ben" wrote in message
news:50650000000500000043B80100-1079395200000@exchange.ni.com...
> I will buck the trend and say there IS a way to prevent the exe from
> CREATING the ini.
>
> Copy your LV ini as the same name created by the exe and include it as
> a support file in your build.
>
> The exe only creates the ini if is not there.
>
> Sorry, but I could not resist!
>
> Ben
0 Kudos
Message 6 of 10
(3,904 Views)
I stand corrected.

Cool!

So it is written at shutdown time.

Ain't this Exchange great?

"As face answers to face and iron answers to iron, so does a man try words" (Proverbs).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 10
(3,904 Views)
Jonnie 5 wrote:

> true true,
> but in the end there still needs to be 2 files: the app and the ini.

Which is what I assumed that the original poster wanted to avoid ;-).

I think except the ExitProcess solution (very, very nasty!!!) and my own
solution to make the directory write protected or just revoke any write
access to that directory for normal users there is no other solutions to
work around that. But then this is a lot of work for what?

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 10
(3,904 Views)
I agree!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 10
(3,904 Views)
> ... the ExitProcess solution (very, very nasty!!!) ...

I agree too.

Wiebe.
0 Kudos
Message 10 of 10
(3,904 Views)