I'll try.

Many thanks

Ferdinando

Il 09/01/2017 21:00, 4d_tech-requ...@lists.4d.com ha scritto:
Message: 6
Date: Mon, 9 Jan 2017 19:46:31 +0100
From: Tai Bui<t...@4d.com>
To: 4D iNug Technical<4d_tech@lists.4d.com>
Subject: RE: Windows users
Message-ID: <A6CE25D40B33F84FAABE3D0A54F8C6A4042980099D86@4d-xn1-exch>
Content-Type: text/plain; charset="utf-8"

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.

------------------------------

Subject: Digest Footer

**********************************************************************
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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to