#209509 - 2014-10-12 09:21 PM
Re: @ipaddress macros are cached, not a real information source
[Re: Lonkero]
|
Patrick20
Fresh Scripter
Registered: 2009-08-27
Posts: 22
Loc: Belgium
|
Hello Ruud,
Any update concerning the IP information that is only retrieved once during the lifetime of the kix32 proces, I use this very often and should realy help me when we can do this more then once.
Many thanks/Patrick
|
|
Top
|
|
|
|
#209510 - 2014-10-12 09:30 PM
Re: @ipaddress macros are cached, not a real information source
[Re: Patrick20]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
|
|
Top
|
|
|
|
#209513 - 2014-10-13 08:12 PM
Re: @ipaddress macros are cached, not a real information source
[Re: Allen]
|
Patrick20
Fresh Scripter
Registered: 2009-08-27
Posts: 22
Loc: Belgium
|
Allen, I tested this but couldn't manage it to read 3 NIC cards from my testcomputer , all are connected on different networks. I used your scripts , only the last network card is just showning up.
|
|
Top
|
|
|
|
#209516 - 2014-10-14 07:43 AM
Re: @ipaddress macros are cached, not a real information source
[Re: Allen]
|
Patrick20
Fresh Scripter
Registered: 2009-08-27
Posts: 22
Loc: Belgium
|
Glenn , when I try to reach your website :[Win32Exception (0x80004005): The network path was not found]
|
|
Top
|
|
|
|
#209518 - 2014-10-14 01:46 PM
Re: @ipaddress macros are cached, not a real information source
[Re: Lonkero]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
; Requires EnumNetworkConnections() - http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=138769&an=0&page=0#138769
;
break on
$remotepc=""
for each $nc in Enumnetworkconnections(3,$remotepc)
$ConnectionName=split($nc,",")[0]
$MACAddress=split($nc,",")[1]
$AdapterName=split($nc,",")[2]
? " Connection Name: " + $connectionname
? " MACAddress: " + $MACAddress
? " Adapter Name: " + $AdapterName
? " Mac Address: " + getipoptions("Macaddress",$remotepc,$macaddress)
? " Static Address: " + getipoptions("StaticIP",$remotepc,$macaddress)
? " DHCP Enabled: " + getipoptions("DHCPEnabled",$remotepc,$macaddress)
? " IPaddress/SM: " + getipoptions("IPAddress",$remotepc,$macaddress)
? " IPaddress0/SM: " + getipoptions("IPAddress0",$remotepc,$macaddress)
? " IPaddress1/SM: " + getipoptions("IPAddress1",$remotepc,$macaddress)
? " IPaddress2/SM: " + getipoptions("IPAddress2",$remotepc,$macaddress)
? " IPaddress3/SM: " + getipoptions("IPAddress3",$remotepc,$macaddress)
? " DefaultGW: " + getipoptions("DefaultGW",$remotepc,$macaddress)
? " DNS Servers: " + getipoptions("DNSServers",$remotepc,$macaddress)
? " WINS Servers: " + getipoptions("WINSServers",$remotepc,$macaddress)
? " DNSSuffix: " + getipoptions("DNSDomain",$remotepc,$macaddress)
? " DNS Search Order: " + setipoptions("DNSDomainSuffixSearchOrder",$remotepc,$macaddress)
? " DHCP Server: " + getipoptions("DHCPServer",$remotepc,$macaddress)
? "DHCP Lease Obtained: " + getipoptions("DHCPLeaseObtained",$remotepc,$macaddress)
? " DHCP Lease Expires: " + getipoptions("DHCPLeaseExpires",$remotepc,$macaddress)
? "---------------"
next
|
|
Top
|
|
|
|
#209595 - 2014-10-29 07:03 PM
Re: @ipaddress macros are cached, not a real information source
[Re: Glenn Barnas]
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
As a workaround, I think the native KiXtart function EnumIPInfo() can also do the trick:
Dim $n
$n = 0
While Not @ERROR
? EnumIPInfo($n, 0, 1)
$n = $n + 1
Loop
If the third parameter, mode, is set to 1, the current IP information is retrieved from the system.
|
|
Top
|
|
|
|
Moderator: ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 323 anonymous users online.
|
|
|