HighTechTalks DotNet Forums  

How to detect Terminal Server in VB.Net

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss How to detect Terminal Server in VB.Net in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Hitesh
 
Posts: n/a

Default How to detect Terminal Server in VB.Net - 03-02-2006 , 10:27 AM






Hi,
I need code in VB.Net to detect if the application is running on Terminal
Server.
I am using the following code. Please let me know if you see any issues in
it or if you have some better code to achieve this functionality:

Dim sTemp As String = Environment.GetEnvironmentVariable("SESSIONNAME")
Dim IsTSSession As String
If (sTemp <> "") And (sTemp.IndexOf("RDP-") = 0) Then
IsTSSession = True
Else
IsTSSession = False
End If

Thanks



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.