ini file does not change according to MUI_INSTALLOPTIONS_WRITE
With the following code, the values in my "test2.ini" custom page do not change according to the calls to "MUI_INSTALLOPTIONS_WRITE".
Strangely enough, the MUI_INSTALLOPTIONS_READ call works fine: it does read the actual values from the ini custom page after changing these by hand.
I have tried to use WriteIniStr but it didn´t help.
Both the nsi file as the ini file are in the same directory.
Function FunctionName ;FunctionName defined with Page command
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "test2.ini"
!insertmacro MUI_INSTALLOPTIONS_WRITE "test2.ini" "Field 1" "State" "nsi text"
!insertmacro MUI_INSTALLOPTIONS_WRITE "test2.ini" "Field 2" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_SHOW
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "test2.ini" "Field 1" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "test2.ini" "Field 2" "State"
MessageBox MB_OK "Field 1 has state: $R1, Field 2 has state: $R2"
FunctionEnd
While the contents of my test2.ini is:
[Settings]
NumFields=2
[Field 1]
Type=Text
Left=10
Right=210
Top=20
Bottom=30
State="ini text"
[Field 2]
Type=Checkbox
Text=Checkbox 1
Left=10
Right=210
Top=40
Bottom=50
State=0