Skip to content
⌘ NSIS Forum Archive

Dynamic InstallType?

6 posts

Yathosho#

Dynamic InstallType?

i'm using an installer with multiple installtypes and i'd like to add one at runtime, depending on the user's configuration.

but can it be done?
Instructor#
If I correctly understood:
InstType "Full"
InstType "Basic"

Function .onInit
SetCurInstType 0
FunctionEnd
Yathosho#
that'd still use static installtypes.. i want to add an installtype on runtime, not set a previously defined.

well, i could do that using this script, but when you select another installtype (temporarily) the selection will not be saved.
glory_man#
I used InstTypeSetText instruction in .onInit (for example InstTypeSetText 5 "NewType"). A new installtype appeared on components page. SectionSetInstTypes-instruction help to set the install types for sections.
Afrow UK#
Yep, says in the docs!
By using a previously unused inst_type_idx number you can create new InstTypes.
-Stu