Sorry I'm not really in a position to help with the programming of this at the moment, but you should not use the ini file to store program data and results. (Although technically you could, as you suggest). It would be completely non-standard, confusing, and potentially disastrous.
It is what it says, a repository for configuration startup values such as you list. Keep it that way .
I may have mislead you about my intentions in my original post.
The ini file will indeed only store very basic details, similar to those I mentioned.
At some stage it may also store details of which graphs to include on a yes or no or a true or false basis
The global variables will only be stored in memory for the duration of the harvesting (now usually taking less than 2 seconds every minute due to the more efficient/reliable logging in method).
All the harvested data is stored in modem_stats.log (or Plink.log for snapshot data), as per the ecripted version.
This ensures a level of compatibility with previously harvested data from the scripted versions for continuity of graphing.
The issue of incorrect error count data (CRC/FEC) being stored/plotted has also been resolved.
The exe version now ONLY obtains its data from xcdslcmd info --stats & no longer bothers to obtain any data from the code that provides the modem's GUI data.
You imply that you are going to run the program every minute on the scheduler, as per your existing batch files. I suggest instead simply loading it at boot time, (which is easy), with an internal timer running the harvesting every 60 seconds.
I did toy with a similar idea when I first put the scripted versions together, but I chose to use Windows Task Scheduler instead, mainly to avoid accidentally closing a running program, thus removeing the potential risk of losing continuity of data.
Ideally under Windows it would be run as a service, but that's another question and not essential.
Maybe an idea for a later date.
My current aim is to try to maintain one set of code that can simply be compiled for Windows or
Linux, simply by using different compilers.