# Get RDP Client Session IP address

**URL:** <https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183>\
**Category:** Ignition\
**Created:** [August 28, 2020, 8:58pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183 "2020-08-28T20:58:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jscheer](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jscheer](https://forum.inductiveautomation.com/u/jscheer)\
**Post date:** [August 28, 2020, 8:58pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/1 "2020-08-28T20:58:59Z")

</div>

I need to change my vision application to use a different instance of a UDT and change labels on the screen based on the IP address of the client session. I am running the clients on an RDP (terminal server). I have the sessions running but getting the IP address using system.net.getIpAddress() returns the Host IP address of the server not the one the client uses to connect. The hostname also returns the name of the Host not the client. Using system.net.getExternalIpAddress() returns 127.0.0.1 and the client tag [System]Client/Network/IPAddress also returns 127.0.01.

Does anyone know of a way to get the RDP client session IP address?  
Or any other way I could detect that it’s a different client starting up so my startup script on show of the window can set some things based on the individual client.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 28, 2020, 9:05pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/2 "2020-08-28T21:05:40Z")

</div>

This was just asked yesterday...

> [@I need IP addresses Of Clients but I am using Microsoft Server 2016 With remote desktops On thin clients](http://forum.inductiveautomation.com/t/i-need-ip-addresses-of-clients-but-i-am-using-microsoft-server-2016-with-remote-desktops-on-thin-clients/38144):
>
> In ignition all of my thinclients have the same UserName and IP address. They are all the UserName and Ip address of the Microsoft SQL Server that is running the remote desktop VMs. My problem is that I have an entire line in one project. The customer wants each station of the line to be viewable but locked out. I have been able to use the client folder’s OSUsername to figure out which client is is active, but then I have problems with security and disabling things. I can use the OSUsername to…

Does the user environment have any tools from inside the session to identify the real client location? If so, you might be able to pass information into the Ignition client via the launcher's option for parameters to client tags.

---

<div class="post-metadata">

**Author:** ![jscheer](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jscheer](https://forum.inductiveautomation.com/u/jscheer)\
**Post date:** [August 28, 2020, 9:13pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/3 "2020-08-28T21:13:25Z")

</div>

Yes I am using thinmanager to mange the clients and actually am passing in the name of the client as shown below to start the correct app.  
#TERMINALNAME# is a variable that it fills in  
This is the command line to start the application

-Dapp.home=C:\Users#TERMINALNAME#.ignition\clientlauncher-data -Dapplication=Ignition%20Repair%20Application

So yes if there is a way to pass in the #TERMINALNAME# to a tag from the command line that would at least be a work around. Not the best way but may be the only way.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 28, 2020, 9:20pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/4 "2020-08-28T21:20:51Z")

</div>

[Client Launchers Commands](https://docs.inductiveautomation.com/display/DOC80/Client+Launchers+Commands)

Particularly -Djavaws.launchparams can write to client tags.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 28, 2020, 9:21pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/5 "2020-08-28T21:21:48Z")

</div>

Precisely. One project, with a startup script that looks at the client tag filled in from the launcher.

---

<div class="post-metadata">

**Author:** ![JeremyAdair87](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@JeremyAdair87](https://forum.inductiveautomation.com/u/JeremyAdair87)\
**Post date:** [August 31, 2020, 4:13pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/6 "2020-08-31T16:13:42Z")

</div>

I was the original poster of the other linked forum post. You can also use OS User name. System\>Client\>User\>OSUsername. That would require that you only log in with one OS user name at each thin client though.

---

<div class="post-metadata">

**Author:** ![jscheer](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jscheer](https://forum.inductiveautomation.com/u/jscheer)\
**Post date:** [August 31, 2020, 7:05pm UTC](https://forum.inductiveautomation.com/t/get-rdp-client-session-ip-address/38183/7 "2020-08-31T19:05:36Z")

</div>

Thanks everyone got it working with passing in command line parameters though thinmanager using a single display client. Thinmanager actually has its own variables to use to get the user logged in and the terminal name. The only issue I have is thin manager is limited right now to only 254 characters for the total path and commands. So I had to reduce the size of my tagname that I was using to get it to work with thinmanager. For anyone else trying it this is the command.

D:\Program Files\Inductive Automation\Vision Client Launcher\visionclientlauncher.exe" -Dapp.home=C:\Users#WINDOWUSERNAME#.ignition\clientlauncher-data -Dapplication=Ignition%20Repair%20Application -Djavaws.launchparams=“TN” -Djavaws.launchparam.TN=#TERMINALNAME#
