title: Using nsis to retrieve choices from checkboxes
body: <p>I'm using nsis for an installer of a webapplication. In one page of the wizard i want the user choice one of three checkboxes: each of them has to set two variables in different ways.</p>
  
  <p>Here is the code i'm trying to run:</p>
  
  <p>!define DATA_ONE   data_one.zip
  !define DATA_TWO   data_two.zip
  !define DATA_THREE data_three.zip</p>
  
  <p>Function myfunc
  ... 
        ${NSD_GetState} $RadioOne $1
        ${NSD_GetState} $RadioTwo $2
        ${NSD_GetState} $RadioThree $3</p>
  
  <pre><code>  ; The two variables i want to set
    Var /GLOBAL CUSTOMER_DATA    ; this should be a File (?)
    Var /GLOBAL LENGTH_POS       ; this is a string
  
    StrCpy $CUSTOMER_DATA ${DATA_ONE} ; default value
    StrCpy $LENGTH_POS ""
  
    ${If} $1 == ${BST_CHECKED}         
       StrCpy $CUSTOMER_DATA ${DATA_ONE}
   StrCpy $LENGTH_POS "3"
    ${endif}
  
    ${If} $2 == ${BST_CHECKED}     
       StrCpy $CUSTOMER_DATA ${DATA_TWO}
       StrCpy $LENGTH_POS ""
    ${endif}
  
    ${If} $3 == ${BST_CHECKED}     
       StrCpy $CUSTOMER_DATA ${DATA_THREE}
       StrCpy $LENGTH_POS ""
    ${endif}      
  
  ; here the line i've got the error
    File ${BUILD_DIR}/$CUSTOMER_DATA
  </code></pre>
  
  <p>...</p>
  
  <p>FunctionEnd</p>
  
  <p>When i try to run it i've got:</p>
  
  <pre><code>File: "./$CUSTOMER_DATA" -&gt; no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
    /oname=outfile one_file_only)
  </code></pre>
  
  <p>I presume the error is because the File i'm constructing isn't defined at compile time but only at runtime. Is it correct ? Should i use macro ?
  What is the more elegant way to solve this problem ?</p>