I am new to the nullsoft installer so there is a distinct possibility that what I am about to ask is a typical "noob" question. That being said I cant find any specific information in the docs
I need to create an installer that has a custom page in it that asks the user for an ip address. My current project has 10 sections in it and this page should only be displayed if the user select the component that needs the information.
The second problem is that this installer will also have the ability to run silently (which installs all components). So I need to know how to pass this value into the installer. For example
MyInstaller.exe /silent /ip:"127.0.0.1"
Any help of guidance on this one would be greatly appreciated
EDIT :
I have been looking at this
But dont fully instand whats going on. I have added the following to my script
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "FileArchive\license.txt"
!insertmacro MUI_PAGE_COMPONENTS
Page custom GetServerIp
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
....
....
....
Function GetServerIp
SectionGetFlags ${sec_} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
Abort
show:
;If not using Modern UI use InstallOptions::dialog "iofile.ini"
!insertmacro MUI_HEADER_TEXT "Server Address" "Enter your servers ip address or name"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "serverip.ini"
FunctionEnd I have copied a custom page ini file from here :(the showUserList.ini which is now my serverip.ini)
But it doesnt seem to do anything, for testing purposes I added a MessageBox MB_OK to the section after the show: and it is displayed, so the code is being hit.
EDIT 2:
It looks like the first example I was looking at missed the following line :
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "serverip.ini"
The custom page now works, now I need to work out how to put a input box on there and save the value into a variable