08-25-2023 10:42 AM
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
08-25-2023 04:05 PM
In your VI that reads the .ini file, have it check the IP then select the appropriate item.
08-25-2023 04:09 PM
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.
08-25-2023 05:41 PM
Do you mean that you want different .ini files; customized at build time?
08-26-2023 02:39 AM
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...
08-26-2023 02:57 AM
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…
08-26-2023 05:30 AM
@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.
08-29-2023 09:29 AM
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.