Archive: unselected sub sections per default


unselected sub sections per default
Hallo,

one more question:

My Code:

 
SubSection "App"
Section /o "Subapp1"
SectionEnd

Section /o "Subapp2"
SectionEnd
SubSectionEnd


Unchecking sections per default by using "/o" works! But the upper Section is checked.
SubSection /o "App" doesn't work. Any idea how to resolve?


Another question:
Is it possible to write the user's selected sectiona in registry? In case of reinstall or update, i want to read the selected sections and check this per default.


Thanks!

SubSection /o "App" doesn't work. Any idea how to resolve?
I resolved it by using SectionGroup instead of SubSection ...


Another question:
Is it possible to write the user's selected sectiona in registry? In case of reinstall or update, i want to read the selected sections and check this per default.
Any ideas?

Thanks!

The memento include file does this...


thanks but if i write


SubSection "App"

${MementoSection} /o "Subapp1" subapp1

${MementoSectionEnd}



${MementoSection} /o "Subapp2" subapp2

${MementoSectionEnd}

SubSectionEnd


i get following error:
Error: resolving install function "__MementoSectionMarkNew4" in function "__MementoSectionMarkNew3"
Note: uninstall functions must begin with "un.", and install functions must not
Error - aborting creation process


Why?, i can not understand. I don't use MementoSection in an uninstaller section

Thanks again for help!

!include memento.nsh
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY software\temp

Function .onInit
${MementoSectionRestore}
FunctionEnd

Function .onInstSuccess
${MementoSectionSave}
FunctionEnd

SubSection "App"
${MementoUnselectedSection} "Subapp1" subapp1
${MementoSectionEnd}
${MementoUnselectedSection} "Subapp2" subapp2
${MementoSectionEnd}
SubSectionEnd
${MementoSectionDone}
...

Hi
And thanks. I reached it out myself. It Works! Now i see the selected sections in the registry with value 1. So far, fine!

I expected that ${MementoSectionSave} in the callback function .onInstSuccess save this selected sections and the ${MementoSectionRestore} in the .onInit callback function will restore them in case of reinstall, if the information in case of reinstall is not deleted in the registry.
But this does not work! Where is my mistake?


Thanks for help ...


my code in setup.nsi


SubSection
Section /o "-hidden"
SectionEnd

${MementoUnselectedSection} "App1" app1
${MementoSectionEnd}

${MementoUnselectedSection} "App2" app2
${MementoSectionEnd}

${MementoSectionDone}

SubSectionEnd

Function .onInit
${MementoSectionRestore}
FunctionEnd

Function .onInstSuccess
${MementoSectionSave}
FunctionEnd


in a Function that decides to update i don't delete the infos (from memento) in registry. If i reinstall, i expected that the sections noted in registry are automatically selected ... But this does not work! Any help? Maybe i'm forgetting something?

I also tested ${MementoSectionDone} after SubSectionEnd.

By the way: What is the difference between Subsection and SectionGroup?

Thank you very much for help!