In the file "AudacityPortable.ini" I've discovered, that in the sections [FileWrite1] - [FileWrite5] at the entry "File" a path with the file "audacity.cfg" was used. But due to the used Typ "INI" is this code invalid. Accordingly, the sections [FileWrite1] - [FileWrite5] have no effect.
I don't know how you came to that conclusion but they do exactly what they should (they replace the
Value
of the theKey
in theSection
of the INI file specified inFile
).It is irrelevant that it has an ini suffix, it is just a method of changing settings that differs from ConfigWrite. You could use both methods in many cases and choose, wich one fits better to the needs.
Unfortunately is not explicit described in the documatation, if it's possible to use the section [FileWriteN] also with other than *.ini files in case of Type=INI. I don't like to test everytime anything in case of such unclear statments. Sorry
Therefore I think, that it's more logical to use Typ=ConfigWrite in this situation.
Are you really sure that Type=INI can apply on the file "audacity.cfg"?
Yes.
The different methods are there to handle special cases. Imagine a config file with different sections (like an ini file) but with the same entries.
Example:
...
[Plugin1]
Path=X:\Folder\Plugin1\...
...
[Plugin2]
Path=X:\Folder\Plugin2\...
...
If you try to write a specific setting called
path
for the second Plugin, you could only do that withType=INI
as there are different settings with the same description andConfigWrite
would fail.-edit-
Oops found an ugly typo and could not withstand to correct it.