Substituting variables in UI ini files
Could anyone tell me how to substitute variables into custom page INI files?
E.g. I need label with 'Administrator' text, but this text depends on language chosen and differs from language to language.
Thanks.
Archive: Substituting variables in UI ini files
Substituting variables in UI ini files
Could anyone tell me how to substitute variables into custom page INI files?
E.g. I need label with 'Administrator' text, but this text depends on language chosen and differs from language to language.
Thanks.
To write to an INI file, use WriteINIStr. If you use Modern UI, use !insertmacro MUI_INSTALLOPTIONS_WRITE instead. Example:
WriteINIStr "File.ini" "Field 1" "Text" "$(Administrator)"
It seems that unfortunately I've wrote unclear message.
I want to reach the following goal:
I have Modern UI ini file like this
[Settings]
NumFields=2
[Field 1]
Type=Label
Left=0
Right=-1
Top=0
Bottom=10
Text=Port:
[Field 2]
Type=Text
Left=0
Right=-1
Top=11
Bottom=23
Flags=ONLY_NUMBERS
State=80
and I want to write something like "${PortString}" instead of "Port", because my installation in future will be multilingual.
This is not possible right now. You can use WriteINIStr until it gets included.