Archive: Checking checkbox status in .onInstSuccess


Checking checkbox status in .onInstSuccess
I have a custom finish page with a set of check boxes. I want to to be able to tell what checkboxes the user has selected/not selected and perform certain actions accordingly only I can't get it to work.

Right now using the MUI_INSTALLOPTIONS_READ macro within the .onInstSuccess callback but I can't seem to read the values here. Maybe I'm checking in the wrong place, anyone have any ideas?


In the manual of Install Options read the value "State"

1=check
0=No check

So you wanna use the "ReadINIStr" and "WriteINIStr" instructions
in that Function


The MUI macro also uses ReadINIStr.

Make sure that you are reading the "State" value.


Yeh I tried ReadINIStr, didn't seem to work. When I switched the MUI_INSTALLOPTIONS_READ code over to the custom function I have for my custom page it works fine. Not sure why that is but it works for me.


Wait, never mind it does work in both places. I don't know what I was doing wrong before but the macro MUI_INSTALLOPTIONS_READ does work in .onInstSuccess

I was initialling getting build errors with,

insertmacro MUI_INSTALLOPTIONS_READ ${TEMP} "FinishDialog.ini"
"Field 2" "State"

When I switched it to,

insertmacro MUI_INSTALLOPTIONS_READ $R0 "FinishDialog.ini"
"Field 2" "State"

Apparently makensis didn't like my user defined variable for storing the state result.


${TEMP} will only work if you say something like

!define TEMP1 $R0
somewhere before hand.