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.
>
>