I've tried many different ways of doing this, from functions to macros, but I can't seem to get it to work.
Here is my approach so far: I read in the stored values from the registry (if they are there) in the .onInit function. Then I do a !define MUI_PAGE_CUSTOMFUNCTION_PRE right before the components page. There I (unsuccessfully) try to select or unselect sections based on the values I read in. Then in the .onInstSuccess function, I want to save off to the registry all the things the user selected on this install.
I also want to do the same thing for checking off a program to run on the MUI finish page (MUI_FINISHPAGE_RUN). I got good ideas from the dynamic finish page thread. http://forums.winamp.com/showthread....hreadid=177448
I can read in from the registry and set it, but I don't know how to detect what was selected and save it off.
Here is how I am currently trying to unselect sections:
Can anyone give me some hints on how to do all this? I appreciate any help you can give.
!include "MUI.nsh"
!include "Sections.nsh"
...
!define MUI_PAGE_CUSTOMFUNCTION_PRE PreComponentsPage
!insertmacro MUI_PAGE_COMPONENTS
...
Function .onInit
ReadRegStr $A HKCU "Software\myprogram" "stringA"
ReadRegStr $B HKCU "Software\myprogram" "stringB"
...
FunctionEnd
Function PreComponentsPage
StrCmp $A "false" 0 +2
!insertmacro UnselectSection ${section1}
StrCmp $B "false" 0 +2
!insertmacro UnselectSection ${section2}
...
FunctionEnd