• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

How to edit cfg via an installer?

Messages
3
Country
unitedkingdom
I wish to read and edit text config files relating to the new installed files during installation.
I would like to read eg. [entry.0] [entry.1] [entry.2] etc then add [entry.3] and [entry.4], it could be entry 3 and 4 are already on the user machine within the text file and therefore I would like to add [entry.5] and [entry.6] in that case. It would basically finding the last [entry.x] and being able to add the next entries in sequence. The installer I was hoping to use can't do this directly.
This is done so often in FS but I can't find any information on it?
Any help, pointing in the right direction much appreciated.

Simon
 
Simon,

If your installer does allow to execute scripts / programs during runtime, you can make a small program to enumerate the ini file and return the next free section.

What installer software do you use?
 
I have been using Install Creator, I will put together a small exe to carry this out. I am surprised there is no example codes around to help with this, its something thats done so often adding to scenery and aircraft cfg's.

Simon
 
I use the C++ functions Get/WritePrivateProfile... to manipulate .cfg files and use the ClickTeam free Install Creator.

George
 
Last edited:
How do you read the maximum section header [flightsim.n] then write the next section to follow on in sequence?
Most tutorials and examples I have found are about altering key values.

Do you have any example code you are willing to share?

Simon
 
Back
Top