Page 1 of 1

Detect is application is being run from TSPlus

Posted: Thu Nov 03, 2016 12:24 pm
by stevejarvis
We have an application which is used both by local users and remote users using TSPlus (using html5). There are a couple of aspects that we need to customise when the application is being used from TSPlus, but I don't want to build two different versions so we need to be able to detect whether the application is running from TSPlus. Is there any way of doing this? If there isn't I suppose we could just check if TSPlus is installed.

Re: Detect is application is being run from TSPlus

Posted: Thu Nov 03, 2016 5:02 pm
by admin
Hello,

Maybe you could use environment variable %SESSIONNAME% for this purpose.

A session detected as logged to the console (client computer) will be labeled as "console" while a remote session will be flagged as “RDP-Tcp#XXX".

Re: Detect is application is being run from TSPlus

Posted: Thu Nov 03, 2016 8:14 pm
by IvanGB
Hi Steve.

You didn't specify which platform you use, but if it is .NET System.Windows.Forms.SystemInformation.TerminalServerSession will return True if running under TSplus.

Cheers.

Ivan

Re: Detect is application is being run from TSPlus

Posted: Fri Nov 04, 2016 11:19 am
by stevejarvis
Thanks. Using %SESSIONNAME% works well.

We are using .NET so I guess so I guess that System.Windows.Forms.SystemInformation.TerminalServerSession would be just as good.