Archive: type of install problem


type of install problem
I have created 4 sections for my software.
In each section I have several checkbox to choose which hardware I would like to set up.

The problem is that everytime I check or uncheck something, the type of install becomes "Custom". And this is the problem because for each type of install, I have particular regedit keys that are created, and those keys are specific to each type.

Is there a way to resolve my problem??

Thank you very much...

:)


In NSIS, an install "type" is a combination of sections. The "custom" install is just a psuedo-type used for non-standard combinations of sections.

What I'm saying is, don't worry about InstTypes.

In a related note, you can specify:

SectionIn RO
inside a section to make that section read-only (always checked).

-dandaman32

Well in fact this is not what I really wanted to do.
I have made an image so that it can be clearer:
http://jeje83.free.fr/forum/install_type.png

The red square allows me to choose an install type/configuration. A special register key is associated to each configuration.
After that, if I try to select specific hardware (any hardware is compatible with any configuration), the install type name (configuration) disappears and the "custom" one appears...

I hope it is clearer now...

Thank you for your help...


You could use an installoptions page with the options on it and either execute or skip the files depending on the type that was selected. Here is an example (assuming you are using MUI).

page custom Prefunc Leavefunc

Function .oninit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "installtype.ini"
FunctionEnd

Function Prefunc
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "installtype.ini"
FunctionEnd

Function Leavefunc
ReadINIStr $0 "PLUGINSDIR\installtype.ini" "Field 2" "State"
ReadINIStr $1 "PLUGINSDIR\installtype.ini" "Field 3" "State"
ReadINIStr $2 "PLUGINSDIR\installtype.ini" "Field 4" "State"
ReadINIStr $3 "PLUGINSDIR\installtype.ini" "Field 5" "State"
ReadINIStr $4 "PLUGINSDIR\installtype.ini" "Field 6" "State"
FunctionEnd

Section Files
IntCmp $0 0 skip0
;Config 1 files and reg keys here
skip0:
IntCmp $1 0 skip1
;Config 2 files and reg keys here
skip1:
IntCmp $2 0 skip2
;Config 3 files and reg keys here
skip2:
IntCmp $3 0 skip3
;Config 4 files and reg keys here
skip3:
IntCmp $4 0 skip4
;Config 5 files and reg keys here
skip4:
SectionEnd
And installtype.ini has the first field as a label and the last 5 fields have a checkbox with each of your configurations. Use the installoptions editor in HM NIS Edit to create the file.

Oh thank you very much for your answer, I am going to study this... thanks again...


I couldn't resist... Here is an example.