Hello All,
I've been using a UDF for some time now which is the code below but for some reason in the past few days its seems to have just stopped working.
Hears the Error Kix is coming back with
ERROR: Unknown Command [Writelog]!
I've tried commenting out the Writelog part but it then comes back with another error which is
ERROR: expected ')'!
on line 369 which is the line that has
Code:
$RC = OpenFile(5, $file, 2)
Any ideas? 
Thanks,
Quenten
Code:
Function GetIPinfo()
; Purpose: Return network info on a computer where EnumIPinfo() fails.
; Uses ipconfig or winipcfg depending on @INWIN.
; Returns an array of three values: IP Addr., SN Mask, and Default Gateway.
dim $IPinfo[2], $file, $RC, $Line, $pos, $loop, $x
WriteLog("Gathering IP info using GetIPinfo()")
$file = "%temp%\junk.txt"
if @inwin=1
shell "%comspec% /c ipconfig >$file"
else
shell "winipcfg /batch $file"
endif
$RC = OpenFile(5, $file, 2)
if $RC = 0
$Line=Readline(5)
$loop = 1
WHILE (@ERROR = 0 and $loop = 1)
if instr($Line, "IP") > 1 and instr($Line, ". . :") > 0 and
right($Line, 7) <> "0.0.0.0"
$x = 0
WHILE (@ERROR = 0 and $loop = 1)
$IPinfo[$x] = substr($Line, instrrev($Line, ":")+2)
if $x<2
$x = $x + 1
do
$Line=ReadLine(5)
until $Line <> "" or @error <> 0
else
$loop = 0
endif
LOOP
else
$Line=ReadLine(5)
endif
LOOP
$RC=Close(5)
del $file
endif
$GetIPinfo = $IPinfo
Endfunction