Archive: how can i merge a ini file to a nsi file


how can i merge a ini file to a nsi file
Hi guys
i´m using nsis just for a couple of weeks and i´m suprised to see how powerful the language is.
My problem ist the following. i´d like to change the installation of putty by given a username and a private key in a window which should appear before the installation starts. Therefor i wrote the .ini file which is at the bottom. The thing is now that i don´t know how i can do to make this window appear or merge this .ini file to the .nsi file.

Thanks in advance for your help.

.ini-file:
[Settings]
NumFields=7

[Field 1]
Type=Label
Text=username
Left=84
Right=148
Top=28
Bottom=44

[Field 2]
Type=Label
Text=Private Key
Left=81
Right=145
Top=54
Bottom=68

[Field 3]
Type=Text
Left=176
Right=299
Top=28
Bottom=41

[Field 4]
Type=FileRequest
Left=176
Right=314
Top=52
Bottom=64

[Field 5]
Type=Button
Text=back
Left=105
Right=155
Top=83
Bottom=99

[Field 6]
Type=Button
Text=abort
Left=172
Right=222
Top=83
Bottom=99

[Field 7]
Type=Button
Text=next
Left=234
Right=284
Top=83
Bottom=99


The most important steps to include an installoptions page are the following. For furthermore advices take a look at the InstallOptions example in your "[..]\NSIS\Example\Modern UI\" folder.

Page custom MyCustomPageShow MyCustomPageLeave

Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "MyCustomIni.ini"
FunctionEnd

Function MyCustomPageShow
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "MyCustomIni.ini"
FunctionEnd

Function MyCustomPageLeave
; put some code here to save or act on the given informations
; and settings of your custom page controls
FunctionEnd

i got it !!!! it´s working very good now.
thanks a lot.