Re: Check type TS protocol
- From: "Michal Ch" <chmiel@xxxxxxxxxxxxxx>
- Date: Sat, 26 Nov 2005 01:30:29 +0100
Hi Gred
thanks for this vbs
Do you know show check client IP in RDP session?
I;ve script for iCA but don' work on RDP
Set objFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
objFarm.Initialize(1)
For Each objSession In objFarm.Sessions
WScript.Echo "User name : " & objSession.UserName
WScript.Echo "IP Address: " & objSession.ClientAddress
Next
Michal
"Greg Moseley" <greg@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:002801c5f13d$f36f1690$6401a8c0@xxxxxxxx
> Michal,
>
> There is an environment variable set for each session %SESSIONNAME% that
> either begins RDP or ICA (RDP-tcp#1 for example). You could query this.
>
> Below is a quick bit of code for you to play with. Paste into Notepad
> and save as something.vbs
>
> I have tested it on a console and through an RDP session, haven't got an
> ICA session to hand to test.
>
> Hope it helps
>
> Greg
>
> //CODE START - REMOVE THIS LINE
> Dim wshShell
> Dim strSession
>
> Set wshShell = Wscript.CreateObject("Wscript.Shell")
> strSesType = Left(wshShell.ExpandEnvironmentStrings("%SESSIONNAME%"), 3)
>
> If strSesType = "Con" Then
> 'Script is running on the Server Console, so exit
> wScript.Echo "Console Session Found"
> wScript.Quit
> ElseIf strSesType = "ICA" Then
> 'ICA Session Found
> 'Launch your ICA Script Here
> wScript.Echo "ICA"
> ElseIf strSesType = "RDP" Then
> 'RDP Session Found
> 'Launch your RDP Script Here
> wScript.Echo "RDP"
> Else
> 'No Session Type Found
> wScript.Echo "None Found"
> wScript.Quit
> End If
> //CODE END - REMOVE THIS LINE
>
>
> -----Original Message-----
> From: Michal Ch [mailto:chmiel@xxxxxxxxxxxxxx]
> Posted At: 24 November 2005 20:43
> Posted To: microsoft.public.windows.terminal_services
> Conversation: Check type TS protocol
> Subject: Check type TS protocol
>
> Hi all
> On my TS server users will logon via RCP and ICA.
> Login script I must set different settings for RDP users and ICA users
> eg if user Tom login via RDP I must set settings A in registry but if
> iser
> Tom login via Citirx I must set - B in registry
> Do you know via vbs chceck type of connection?
>
> Have a nice day,
> Michal
>
>
.
- References:
- Re: Check type TS protocol
- From: Greg Moseley
- Re: Check type TS protocol
- Prev by Date: Re: Shortcut to the desktop on the remote client
- Next by Date: Re: Adding printers to NTPRINT.INF
- Previous by thread: Re: Check type TS protocol
- Next by thread: Epson T88III printers
- Index(es):
Relevant Pages
|