LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the default .INI path of a .Exe ?

Hi everyone,

 

I have created a .exe of my program and I would like to associate it to a .ini file so that I can set some of my variables are set by default. I am new to using .ini files.

I have used the write and read INI Labview example and it works fine with my original program and with the .exe.

 

The problem is that in my original program, the .ini file is in specific place. I could put that .Ini file in the same place on the computer where the .exe is running. But I was wondering if there is a possibility to set the folder containing the .exe as the default path to go and get .ini file?

 

If this is not possible, what is the best thing I should do regarding the location of a .ini for a .exe?

 

Thanks for your help.

User

Message 1 of 4
(2,723 Views)

You can use app dir constant

ini1.png

 

or change file name in builder settings

ini2.PNG

0 Kudos
Message 2 of 4
(2,713 Views)

Hi User,

 

you can place the INI file anywhere you want and have your EXE load/open the INI file from that place.

 

Usual places to store INI files are (among others):

- %localappdata%

- %appdata%

- %programdata%

- the folder, where your EXE is located in

- the data subfolder of your EXE

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO
0 Kudos
Message 3 of 4
(2,709 Views)

@Artem.SPb wrote:

You can use app dir constant

ini1.png

 

or change file name in builder settings

ini2.PNG


Not quite sure the intent is to use a custom LabVIEW config.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(2,690 Views)