Archive: Form to Collect IP, Host and Port for IIS Website


Form to Collect IP, Host and Port for IIS Website
Hi my name is Rodrigo and I have just started to use NSIS because Install Shield is horrible. I am trying to create an installer that will install and configure a website in IIS. The problem I am having is that I need to configure the Website, IP, Host, and Port. Is there a way to create a form which can be populated with all the available IP's on the server and create a drop down to select one, a Host field, and a Port field, which can then be passed to a script?


IP_plug-in should return IP's list.


Originally posted by Takhir
IP_plug-in should return IP's list.
How do I get the IP's to show up inside the form. I am using MUI and a created a custom page and now i need to transfer the ip list in the droplist.

Originally posted by Rodrigog
How do I get the IP's to show up inside the form. I am using MUI and a created a custom page and now i need to transfer the ip list in the droplist.
The code below will populate a droplist field with values and initialize it.

# Installer functions
Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
Pop $R0

!insertmacro MUI_INSTALLOPTIONS_EXTRACT "webserver.ini"

#Populates Fields in WebConfig
;!insertmacro MUI_INSTALLOPTIONS_WRITE "webserver.ini" "Field #" "Name" "Value"
!insertmacro MUI_INSTALLOPTIONS_WRITE "webserver.ini" "Field 5" "ListItems" "(All Unassigned)|10.0.0.0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "webserver.ini" "Field 5" "State" "(All Unassigned)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "webserver.ini" "Field 5" "Text" "(All Unassigned)"


FunctionEnd