Archive: Checking for different versions of a product and displaying the result in a list (Sys


Checking for different versions of a product and displaying the result in a list (Sys
Hello, listers!
OK, I understand that in order to check for different versions of a product, I would enumerate appropriate registry keys. How do I display the result in a list view and act upon user's selection of any item from that list?
Example: say, there are two versions of Microsoft Office installed on one's computer;
I detected and collected existing versions from the registry;
I'd like to display them in a list and then,
depending on what the user selects change the $INSTDIR for my app, or do anything else necessary.

I'd be grateful for your help.

Regards,
Victor


Use the InstallOptions plugin for a custom page.


Use InstallOptions in the Contrib directory. Have at look at the examples and the documentation and then post back here with more specific problems if you encounter any difficulty.


Hi, again!
Well, I did browse through examples and that cleared my head a bit. However, I still cannot understand how I can populate the list with the registry keys that I collected. The only similar option I could find is by using the "ListItems" parameter in the .ini file. The problem is that with ListItems I have to specify those items. What I need is an ability to create the list dynamically, not based on the values in the .ini file. I tried pushing the values onto a stack, but the modern UI macro does not seem to allow me to pop those variables back and display them.
What am I still missing here?

Thanks,
Vic


Use the MUI_INSTALLOPTIONS_WRITE macro to write to the INI file on runtime.


Thanks a lot. However, where can I find the correct format for tis macro? Is the syntax the same as for the MUI_INSTALLOPTIONS_READ?


You can find everything in the Modern UI Readme (Contrib\Modern UI\Readme.html).

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Value Name" "Value"