Mike Pratt
(Fresh Scripter)
2004-08-09 06:17 PM
Capturing IP Address of Terminal Server Client

I have done some searching on how to capture an IP address from a client connecting to a W2K3 Terminal Server and can't seem to find anything on it...has anyone seen anything new on this? Or written a new script/UDF?

Thanks,
Mike


Howard Bullock
(KiX Supporter)
2004-08-09 07:12 PM
Re: Capturing IP Address of Terminal Server Client

There have been several threads about collecting client side data from a terminal server session.

This is one of the threads.

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=117828

Read the search forma and it's settings carefully when searching.


Mike Pratt
(Fresh Scripter)
2004-08-09 08:02 PM
Re: Capturing IP Address of Terminal Server Client

Unfortunately I'm not running Citrix and the clientdata.exe doesn't give me what I need for info...I can see the info I need in Terminal Server Manager on the server, I just don't know where to enumerate the info from or if there is a system variable available to pull info from...

Thanks,
Mike


Les
(KiX Master)
2004-08-09 08:29 PM
Re: Capturing IP Address of Terminal Server Client

Not all the solutions provided require Citrix.

Mike Pratt
(Fresh Scripter)
2004-08-09 09:03 PM
Re: Capturing IP Address of Terminal Server Client

I have downloaded and tried to run both ctxcinfo and clientnfo and they both are trying to run wfapi.dll, which I understand to be a Citrix .dll...

Les
(KiX Master)
2004-08-09 09:16 PM
Re: Capturing IP Address of Terminal Server Client

Then maybe you need to dig a little deeper.

Borrowing directly form the FAQ:
Quote:

WTSManager.dll does not require Citrix but does require that the DLL be registered.




Mike Pratt
(Fresh Scripter)
2004-08-09 10:26 PM
Re: Capturing IP Address of Terminal Server Client

Thanks for the info...I discovered the WMI Class that holds this info so I might try that avenue...is there an FAQ on how to integrate WMI with KIX?

Thanks,
Mike


Mike Pratt
(Fresh Scripter)
2004-08-10 08:27 PM
Re: Capturing IP Address of Terminal Server Client

I'm really close to getting this to work, but I need some help with KiX syntax...I was hoping you guys could help...I found software that runs as a VBScript that is only 2 lines and I'd like to incorporate it into my KiX script. I need to take the value that the VBScript spits out and incorporate it into my script...here is what I've got:

set oWts = CreateObject("WtsScript.WtsQuery")
WScript.Echo oWts.ClientIp

Instead of doing an echo, how could I take the value and create a variable?

Thanks for all the help!
Mike


Mike Pratt
(Fresh Scripter)
2004-08-10 08:34 PM
Re: Capturing IP Address of Terminal Server Client

I got it guys...thanks for your help...

$oWts = CreateObject("WtsScript.WtsQuery")
$clientip = $oWts.ClientIp

Mike


aahl
(Just in Town)
2008-04-16 05:25 PM
Re: Capturing IP Address of Terminal Server Client

After reading the posts in this thread, I think using WTSManager.dll will help me do what I need. Can anyone tell me where to get this file?
Thanks.


NTDOCAdministrator
(KiX Master)
2008-04-16 08:29 PM
Re: Capturing IP Address of Terminal Server Client

You can download it from my site.

wtsmanager.zip