LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable .ini file depending on target PC?

Hello,

I am using the ole.authnlevel switch in the ini file of the executable that I am building. This executable is then installed on 150+ PCs. The problem is that depending on the target PC the value of this switch must be different (1, 2 or 5). Is there a way to keep having one app and .ini file but somehow case the content of the ini file based on the IP address of the machine on which the executable runs? Or any other method?

Thank you very much for any insights

Christophe

0 Kudos
Message 1 of 8
(964 Views)

In your VI that reads the .ini file, have it check the IP then select the appropriate item.

0 Kudos
Message 2 of 8
(919 Views)

I am talking about the .ini file that is generated when compiling an executable. The switch that I referred to is one of its line.

0 Kudos
Message 3 of 8
(915 Views)

Do you mean that you want different .ini files; customized at build time?

0 Kudos
Message 4 of 8
(906 Views)

Ideally I would prefer integrating a sort of 'scripting' inside of a unique .ini file. The scripting would include the case depending on the target PC IP addresses or other criteria...

0 Kudos
Message 5 of 8
(894 Views)

Hi Christophe,

 


@Christ0phe wrote:

Ideally I would prefer integrating a sort of 'scripting' inside of a unique .ini file. The scripting would include the case depending on the target PC IP addresses or other criteria...


Ideally you can create your own batch file and implement all the scripting you need, even based on IP addresses. That batch file may change the ini file as needed and then start your executable with the changed ini file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(886 Views)

@Christ0phe wrote:

Ideally I would prefer integrating a sort of 'scripting' inside of a unique .ini file. The scripting would include the case depending on the target PC IP addresses or other criteria...


You can't have scripting inside a .ini file.  They don't execute.

If you want a single .ini file that handles all cases, see my original response.

0 Kudos
Message 7 of 8
(860 Views)

You can have a network accessed file with e.g. a section with computer name [Pcname] and have the program look for a key there.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(777 Views)