PC Review


Reply
Thread Tools Rate Thread

Detect if running under Terminal Server?

 
 
Kevin Hodgson
Guest
Posts: n/a
 
      9th Jul 2004
Is there any way in a .NET App to detect if it is being run under Terminal
Server?

I have some functions of my program (like launching emails, and saving
files) that need to be handled differently if the user is running it
locally, or if they're running under Terminal Server.


 
Reply With Quote
 
 
 
 
One Handed Man \( OHM - Terry Burns \)
Guest
Posts: n/a
 
      9th Jul 2004
This can be real tricky stuff to work with. I suggest you look in the MSDN
site library for references to coding under terminal server.

Good Luck

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"Kevin Hodgson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there any way in a .NET App to detect if it is being run under Terminal
> Server?
>
> I have some functions of my program (like launching emails, and saving
> files) that need to be handled differently if the user is running it
> locally, or if they're running under Terminal Server.
>
>



 
Reply With Quote
 
Klaus H. Probst
Guest
Posts: n/a
 
      9th Jul 2004
I believe simply calling one of the TS API functions (through interop of
course) that return a TS session ID will tell you if you're running under
one. WTSEnumerateProcesses for example.

However, this may or may not work in XP or 2003 where the rules (I think) of
what a terminal session is change.

There should be more information in the TS documentation section on MSDN.

--
Klaus H. Probst, MVP
http://www.vbbox.com/


"Kevin Hodgson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there any way in a .NET App to detect if it is being run under Terminal
> Server?
>
> I have some functions of my program (like launching emails, and saving
> files) that need to be handled differently if the user is running it
> locally, or if they're running under Terminal Server.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can my application detect if it is running in a Terminal Services client session? Alek Luchnikov Microsoft Access 1 13th Feb 2008 04:15 PM
How can my application detect if it is running in a Terminal Services client session? Alek Luchnikov Microsoft Access Getting Started 0 13th Feb 2008 12:36 PM
detect if running on a terminal server Smokey Grindle Microsoft VB .NET 6 7th Aug 2006 06:46 PM
How to detect Terminal Server in VB.NET =?Utf-8?B?SGl0ZXNo?= Microsoft Dot NET 2 4th Mar 2006 08:30 AM
Detect if running in terminal server session Oenone Microsoft VB .NET 2 25th Mar 2005 11:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:44 AM.