Page 1 of 1 1
Topic Options
#198975 - 2010-07-12 08:07 AM Stopping Login Script in RDP session
AhmedS Offline
Just in Town

Registered: 2010-07-12
Posts: 3
Loc: CA, USA
Is there a way to detect if the session is via RDP and Skip the login script?
I know we can detect the "Terminal Server" session and skip the script by using below code.

IF @PRODUCTSUITE = 16
EXIT
endif

Top
#198976 - 2010-07-12 10:28 AM Re: Stopping Login Script in RDP session [Re: AhmedS]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You can use the SessionType UDF for this.

 Code:
Break on

;Get the session type.
$sessiontype = SessionType()

;check the session type and start script if it is con (console).
If $sessiontype = "con"
	;start your script here
EndIf


UDF Library » SessionType() - Gets the session type for the current user
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#198989 - 2010-07-12 08:56 PM Re: Stopping Login Script in RDP session [Re: Mart]
AhmedS Offline
Just in Town

Registered: 2010-07-12
Posts: 3
Loc: CA, USA
Great, thanks for your help.

I also found @TSSESSION returns 0(zero) on console and it returns 1(One) in RDP session. Is it o.k to use @TSSESSION to detect RDP?

Any suggestions?

Top
#198991 - 2010-07-12 10:02 PM Re: Stopping Login Script in RDP session [Re: AhmedS]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Mart's method lets you distinguish between RDP and ICA (citrix) connections. If you don't need that capability, then @TSSESSION should be fine.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#198992 - 2010-07-12 10:29 PM Re: Stopping Login Script in RDP session [Re: Glenn Barnas]
AhmedS Offline
Just in Town

Registered: 2010-07-12
Posts: 3
Loc: CA, USA
Thanks Mart & Glenn; This really helped me.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.127 seconds in which 0.1 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org