Hi,
Sorry I think I misunderstood the original question. Did you mean that you want
to detect the IP address or user name of the client environment connected to
the Terminal environment over a remote desktop connection through 4D ran on the
Terminal environment and not on the client environment?
You can do this using LEP:
C_TEXT($in;$out)
$in:=""
LAUNCH EXTERNAL PROCESS("cmd.exe /C netstat -n | find \":3389\" | find
\"ESTABLISHED\"";$in;$out)
netstat -n | find ":3389" | find "ESTABLISHED"
Will generate a list of remote ip addresses connected through remote desktop,
which, by default, uses port 3389.
The results, $out, will look something like
TCP {HostIP}:3389 {ClientIP:port} ESTABLISHED\r\n
You can then create a method to parse the text for the Client IP.
Best Regards,
-Tai B.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************