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
Components section sequence
6 posts
In your first section, do this:
SectionGetFlags ${SECNAME} $R0
StrCmp $R0 1 0 NoCleanReg
...
NoCleanReg:
-Stu
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
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:
Now you just need a dummy section with the title "Clean registry" and id of CLEANREG:Section ""
SectionGetFlags ${CLEANREG} $R0
StrCmp $R0 1 0 NoCleanReg
...
NoCleanReg:
SectionEnd
-Stu
Section "Clean registry" CLEANREG
SectionEnd
Unfortunatly i get an error message.
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
😕Error: could not resolve label "NoCleanReg" in install section "Blokje1" (0)
Error - aborting creation process
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
You can create new variables by using Var VarName
-Stu