Re: Windows users

2017-01-11 Thread Koen Van Hooreweghe
Hi Ferdinando,

An other way to look at it: store the local machine IP in your data upon 
startup of the client. And eventually the disconnect when quitting. The 
advantage is you can have a history of which client connected from which IP.

HTH
Koen

Op 11-jan.-2017, om 07:48 heeft stardata.info  het 
volgende geschreven:

>> 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?




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
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
**

RE: Windows users

2017-01-10 Thread stardata.info

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
**

RE: Windows users

2017-01-09 Thread Tai Bui
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:4d_tech-unsubscr...@lists.4d.com
**

RE: Windows users

2017-01-09 Thread stardata.info

Hi,

IT_MyTCPAddr command, return the ip number of the local pc, but i need to know 
the ip number or the username of the pc that enter with remote desktop.
When the 4D client run in the user created on the windows server, this command 
give the ip of the server machine, not the ip of the pc that enter using remote 
desktop

Thanks
Ferdinando


Il 09/01/2017 17:26, 4d_tech-requ...@lists.4d.com ha scritto:

Message: 6
Date: Mon, 9 Jan 2017 16:29:50 +0100
From: Tai Bui<t...@4d.com>
To: 4D iNug Technical<4d_tech@lists.4d.com>
Subject: RE: Windows users
Message-ID: <A6CE25D40B33F84FAABE3D0A54F8C6A404297CE1661E@4d-xn1-exch>
Content-Type: text/plain; charset="utf-8"

Hi,

There a number of ways to do this. One way is to try using the Internet 
Commands' IT_MyTCPAddr command:
http://doc.4d.com/4Dv16/4D-Internet-Commands/16/IT-MyTCPAddr.301-3069779.en.html

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

Re: Windows users

2017-01-09 Thread Nigel Greenlee
You can also use php-there is an example in the 4D documentation of this-no 
plug in required. Page 974 of the english 14.3 language document 

C_TEXT($userAccount)
PHP GET OPTION(PHP privileges;$userAccount)

ALERT($userAccount)

 



> On 9 Jan 2017, at 15:29, Tai Bui  wrote:
> 
> Hi,
> 
> There a number of ways to do this. One way is to try using the Internet 
> Commands' IT_MyTCPAddr command:
> http://doc.4d.com/4Dv16/4D-Internet-Commands/16/IT-MyTCPAddr.301-3069779.en.html
> 
> 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:4d_tech-unsubscr...@lists.4d.com
> **

**
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
**