It actually seems to work the same way for me when sending from NT server. Try this.
code:
? 'Enter a username : '
Gets $User
$IPTempFile = "%Temp%\TempFile.xxx"
$NameTempFile = "%Temp%\TempFile.yyy"
If Exist ("$IPTempFile")
Del $IPTempFile
Endif
If Exist ("$NameTempFile")
Del $NameTempFile
Endif
shell '%comspec% /c nbtstat -R'
shell '%comspec% /c net send $User ""'
shell '%comspec% /c nbtstat -c > $IPTempFile'
$filehandle = Freefilehandle()
If Open ($filehandle, $IPTempFile) = 0
$line = ReadLine ($filehandle)
While @Error = 0
$type = Trim (SubStr ($line, InStr ($line, ">")+1))
If InStr ($type, "unique")
$IPSTRING = Trim (SubStr ($type, InStr ($type, " ")+1))
$IPSTRING = SubStr ($IPSTRING, 1, InStr ($IPSTRING, " ")-1)
? $IPSTRING
Endif
$line = ReadLine ($filehandle)
Loop
Endif
$null = Close ($filehandle)
If $IPSTRING
shell '%comspec% /c ping -a $IPSTRING > $NameTempFile'
$filehandle = Freefilehandle()
If Open ($filehandle, $NameTempFile) = 0
$line = ReadLine ($filehandle)
While @Error = 0
$type = SubStr ($line, 1, 7)
If $type = "Pinging"
$NAMESTRING = SubStr ($line, InStr ($line, " ")+1)
$NAMESTRING = SubStr ($NAMESTRING, 1, InStr ($NAMESTRING, " ")-1)
? $NAMESTRING
Endif
$line = ReadLine ($filehandle)
Loop
Endif
$null = Close ($filehandle)
Endif
If Exist ("$IPTempFile")
Del $IPTempFile
Endif
If Exist ("$NameTempFile")
Del $NameTempFile
Endif
? 'DONE'
get $
"EDIT" - Changed code to search for > instead of a certain amount of chars.
[ 11. February 2003, 20:01: Message edited by: CitrixMan ]