Archive: Components section sequence


Components section sequence
First i will try to explain what i want to achieve. And then the way i think to do it, but i got stuck there.

I have a prog, with many regstrings. I want to have an option (checkbox in the components page) so people can choose to clean the reg before installing the program. (in the setup (new) regstrings are added)

So a I made an section for the Components page in which the reg is cleaned (not the first section, it has to be the last section), but this way the reg wont be cleaned before the setup install the other sections (when new regstrings are added).

Who can help me to solve this, 'hard for me to explain'?

Thanks


In your first section, do this:
SectionGetFlags ${SECNAME} $R0
StrCmp $R0 1 0 NoCleanReg
...
NoCleanReg:

-Stu


I have tried, and i failed. I'm defiantly not a pro in NSIS. Could you explain it a bit.

To make my question clearer. My last section needs to be executed before section#1.

Anyway Thanks


The code a posted gets the state of ${SECNAME}. If it's checked, then it will run the code below it. You need to put it in your first Section:

Section ""
SectionGetFlags ${CLEANREG} $R0
StrCmp $R0 1 0 NoCleanReg
...
NoCleanReg:
SectionEnd
Now you just need a dummy section with the title "Clean registry" and id of CLEANREG:

Section "Clean registry" CLEANREG
SectionEnd


-Stu

Unfortunatly i get an error message.

Error: could not resolve label "NoCleanReg" in install section "Blokje1" (0)
Error - aborting creation process


:confused:

And i got an small question. i have used many, many variables in my setup. I have used the $0-9 and $R0-R9 variables. Is there any way to use more? (Not i am aware of).

Thanks

Sebas

As the message rightly says, you are missing the label "NoCleanReg" in your Section. See my snippet of code again... "NoCleanReg:" is the label.

You can create new variables by using Var VarName

-Stu