Detect is application is being run from TSPlus

General conversation about our product. Get help with your 'How To' questions.
Post Reply
stevejarvis
Posts: 13
Joined: Thu Jan 31, 2013 9:08 am

Detect is application is being run from TSPlus

Post by stevejarvis » Thu Nov 03, 2016 12:24 pm

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.

User avatar
admin
Site Admin
Posts: 1649
Joined: Wed Sep 05, 2012 6:38 am

Re: Detect is application is being run from TSPlus

Post by admin » Thu Nov 03, 2016 5:02 pm

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".
Olivier
TSplus support team administrator
Image

IvanGB
Posts: 93
Joined: Sat Feb 06, 2016 2:26 pm

Re: Detect is application is being run from TSPlus

Post by IvanGB » Thu Nov 03, 2016 8:14 pm

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

stevejarvis
Posts: 13
Joined: Thu Jan 31, 2013 9:08 am

Re: Detect is application is being run from TSPlus

Post by stevejarvis » Fri Nov 04, 2016 11:19 am

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.

Post Reply