Get IP address for IIS Service
I am using NSIS to install a perl program on an IIS server.
However, although on my machine, I use the standard http://127.0.0.1/ to access the website on my IIS server, a friend who wants to use the program has a different setting as he is running a separate server on his intranet.
I cannot find a means of finding this IP address in the registry which is a pain.
So, I guess I need to prompt the user to enter the IP address on installing the program (unless anyone has a better idea).
Does anyone know of a reliable code to enter an IP address? I have searched the archive, but to no avail.
Also, I have created a simple .ini file to display the prompt, but cannot get it to display:
( in main section I have included)
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "E:\license.txt"
; Need to read IP address
Page custom SetIP "ValidateIP" "Set your IP Address"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
(and then later on included)
.
.
.
.
.
Function SetIP
;Display the InstallOptions dialog
InstallOptions::dialog "$PLUGINSDIR\IP.ini"
!insertmacro MUI_HEADER_TEXT "Select IP Address" "Enter the IP Address of your server\n(Default 127.0.0.1)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "$PLUGINSDIR\IP.ini"
!insertmacro MUI_INSTALLOPTIONS_READ $varCustomerIP "$PLUGINSDIR\IP.ini" "Field 1" "State"
; Temporary fix
StrCpy $varCustomerIP "127.0.0.1"
FunctionEnd