Wow, thanks for the help guys. It really is appreciated. I am now capturing IP's like I wanted, but now I'm having a problem writing drivespace to my db now. I get the server named "romburner" c:\ drive and the rest are ".0" in their table. I'm sure that I'm doing something fundamentally wrong and just can't see the forrest for the trees. I've run this in debug mode with no errors. Here's the code....btw, I'm using ver. 3.62

code:
 
;Setconsole ("HIDE")
$engine = "dao.dbengine.36"
$database = "c:\inetpub1\wwwroot\db1.mdb"
$dbe = olecreateobject ( "$engine" )
$dbs = Val ( "&" + olecallfunc ( $dbe, "opendatabase", "s", "$database" ))
$Space = GetDiskSpace("\\romburner\c$")
$Server = "romburner"
$Drive = "C"
Gosub "Calculate"
Gosub "Ip"
Gosub "WriteToFile"
$Space = GetDiskSpace("\\romburner\d$")
$Server = "romburner"
$Drive = "D"
Gosub "Calculate"
Gosub "Ip"
Gosub "WriteToFile"
$Space = GetDiskSpace("\\towens2k\c$")
$Server = "towens2k"
$Drive = "C"
Gosub "Calculate"
Gosub "Ip"
Gosub "WriteToFile"
$Space = GetDiskSpace("\\towens2k\d$")
$Server = "towens2k"
$Drive = "D"
Gosub "Calculate"
Gosub "Ip"
Gosub "WriteToFile"

GoTo "End"
:WriteToFile
;$X = Writeline (1, "Free Space On $Server $Drive Drive: " + "$ErrMsg" + Chr(013) + Chr(010))
$rs = olecallfunc ( $dbs, "execute", "s","INSERT INTO TABLE3 (Dato,Server,Drive,Space,Ip) VALUES ('@Date','$Server','$Drive','$ErrMsg','$ip');")
If @error GoTo End EndIf
Return
:Calculate
Select
Case $Space < 1024 ;** Kilobytes
$Space = $Space * 100
$Units = " Kilobytes"
Case $Space => 1024 AND $Space < 1048576 ;** Megabytes
$Space = ($Space * 100) / 1024
$Units = " Megabytes"
Case $Space => 1048576 ;** Gigabytes
$Space = $Space / 10486
$Units = " Gigabytes"
EndSelect
;** Convert the $Space value to a string by adding a space to the beginning
$Space = " " + $Space
$Length = Len($Space)

;** Add the decimal point 2 spaces from the end.
$Space = SubStr($Space, 1, $Length - 2) + "." + SubStr($Space,$Length - 1, 2)
$ErrMsg = LTrim($Space)

:Ip
$TEMP = "%temp%\ping.txt"

SHELL '%COMSPEC% /c ping $Server -n 1 | find /i "TTL" >"$TEMP"'

$IP = ""
If Open(1,$TEMP) = 0
$Line = ReadLine(1)
If $Line
$IP = SubStr($Line,12,InStr($Line,":")-12)
EndIf
$= Close(1)
EndIf
Return
:End
If $dbe
$rs= olereleaseobject ( $dbe )
EndIf
If $dbs
$rs= olereleaseobject ( $dbs )
EndIf


_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain