Archive: Load a droplist


Load a droplist
  Hello.

Is there a way to load a "DropList" from a variable?
I need to load the list from a registry key in the following format : "element1|element2|element3|...|elementN" I think that is the right format for the "listitems" property of the control.

I'm writing a patch that reads that value from the registry, which was written by the installer.

I know how to work with the registry. The only thing I don't know is how to send the content of the var to the "DropList".

I searched the forums, but didn't find anything.

Help would be appreciated.
Thanks.


WriteINIStr or MUI_INSTALLOPTIONS_WRITE before displaying the page.

-Stu


Thanks. I've tried both options:


.

readregstr $0 HKCU "SOFTWARE\SRVP" "Sistemas" ;Formato: elem1|elem2|elem3|...|elemN
!insertmacro MUI_INSTALLOPTIONS_WRITE "EmpSel.ini" "Field 3" "ListItems" $0
;writeinistr "Empsel.ini" "Field 3" "ListItems" "1|2|3" ;para ver si funciona...
!
insertmacro MUI_INSTALLOPTIONS_DISPLAY "EmpSel"
>FunctionEnd
>
Still, the DropList appears empty.
For what I've seen, the function just writes an ini file in "C:\windows\temp" directory...
But what i need is to load the DropList on runtime from a registry key. Is there any way to do that?

With MUI_INSTALLOPTIONS_DISPLAY, you're displaying EmpSel, however you modify EmpSel.ini with MUI_INSTALLOPTIONS_WRITE.