Dynamic Selection of Uninstall Sections does not work
Hi all,
i have a problem with my uninstaller, every section i execute on install, places a reference in the registry using.
WriteRegStr HKLM "${REGKEY}\Components" "Component1" 1
now on uninstall i have
!macro _SELECT_SECTION SECTION_REGISTRY SECTION_NAME SECTION_ID
Push $R0
ReadRegStr $R0 HKLM "${SECTION_REGISTRY}" "${SECTION_NAME}"
MessageBox MB_OK "${SECTION_REGISTRY}-${SECTION_NAME}-${SECTION_ID}"
${IF} $R0 = 1
MessageBox MB_OK "SELECT-${SECTION_ID}"
!insertmacro SelectSection "${SECTION_ID}"
${ELSE}
MessageBox MB_OK "UNSELECT-${SECTION_ID}"
!insertmacro UnselectSection "${SECTION_ID}"
${ENDIF}
Pop $R0
!macroend
!define SELECT_SECTION `!insertmacro _SELECT_SECTION`
(Messageboxes are for Debug!)
Section "-un.Component1" UNSEC_Component1
MessageBox MB_OK "Removing Component1"
SectionEnd
Function un.onInit
${SELECT_SECTION} "${REGKEY}\Components" "Component1" UNSEC_Component1
FunctionEnd
Now i get all the needed MessageBoxes from the macro telling me the section is selected but it never executes the section....
Any ideas?