Archive: Evaluating a radio button field


Evaluating a radio button field
I have two radio button fields, the values of which are read into two variables, $var_DB_TOOLS_INSTALLED and $var_DB_TOOLS_NOT_INSTALLED. I know that if the button is selected the value of the variable will be 1, and 0 for unselected. However, I seem to have a problem evaluating these fields with the following code:

${If} "$var_DB_TOOLS_INSTALLED" == "1"
;DO A
${Else}
;DO B
${EndIf}


The code never gets into ';DO A' so therefore I know I'm evaluating the variable wrong.

Any ideas?

Never worry guys I seem to have this sorted. Originally I had the following line of code on a page that came prevoius to the one where I was executing the above code:

!insertmacro MUI_INSTALLOPTIONS_READ $var_DB_TOOLS_INSTALLED "Main_Screen_3.ini" "Field 3" "State"


Whereas I moved it to just before I was evaluating the variable i.e.:

!insertmacro MUI_INSTALLOPTIONS_READ $var_DB_TOOLS_INSTALLED "Main_Screen_3.ini" "Field 3" "State"

${If} "$var_DB_TOOLS_INSTALLED" == "1"
;DO A
${Else}
;DO B
${EndIf}