Using AI 7.7:
I need to know during installation: the IP of the computer that the installer is running on. I don't want "localhost" or stuff like that: I need the WAN IP of the computer.
How can I do that?
Many thanks, Dashut.
Code: Select all
Function GetIPAddress()
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration ")
DIP = ""
dim x
dim IPAddr(255)
x = 0
For Each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
If Not (IPConfig.IPAddress(i)="0.0.0.0") Then
IPAddr(x) = IPConfig.IPAddress(i)
x = x + 1
End if
Next
end if
next
'msgbox "First IP is: " & IPAddr(0)
' if more IP's exist, they will be in IPAddr(1), IPAddr(2) and so on
Session.Property("MY_COMPUTER_IP1")=IPAddr(0)
End Function
Dashut wrote:Using AI 7.7:
I need to know during installation: the IP of the computer that the installer is running on. I don't want "localhost" or stuff like that: I need the WAN IP of the computer.
How can I do that?
Many thanks, Dashut.
FOLLOW US
Get the latest news in Application Packaging