Skip to content
⌘ NSIS Forum Archive

Dynamic installation type

5 posts

bambou51#

Dynamic installation type

Here is what I need to do.

My setup search for a previous install of the software. If I find it I allow 2 different installation type: Update / New Installation, if no previous install is found the user con only select New installation.
How can I do it ?
For now the only thing I was not able to do is dynamically change the list of installation type.

Any idea ?
bambou51#
Another thing, I was not able to do, is to get the instType index from the onChangeSel callback. I tried to use
GetCurInstType $0
but $0 remains equal to 0 even when I change the installtype from the combobox.
bambou51#
So I have

InstType $(UPDATE)
InstType $(NEWINSTALL)
InstType /NOCUSTOM

and both InstType are using the same sections. I just use InstType as a graphic way to set a flag that will be used later on durinf the copy process

Then both my sections look like this:

Section "#1" Section1
SectionIn 1 2
...
SectionEnd

Section "#2" Section2
SectionIn 1 2
...
SectionEnd

Then because of this (same sections enabled in all the instType), GetCurInstType seems not to be working...
onad#
values with $(XYZ) should be used for translated strings use
${WHATEVER} for variables.

Maybe has nothing to do with your initial problem, but still...
bambou51#
those are for translation.
The name of my InstType depends on the selected language.
So no mistakes here 😉