Re: Check type TS protocol
- From: "Greg Moseley" <greg@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Nov 2005 21:28:02 -0000
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
.
- Follow-Ups:
- Re: Check type TS protocol
- From: Michal Ch
- Re: Check type TS protocol
- Prev by Date: Re: Internet Programs changing between profiles.
- Next by Date: Re: Printers visible to all users
- Previous by thread: net use lpt and win2003 terminal services
- Next by thread: Re: Check type TS protocol
- Index(es):
Relevant Pages
|