Detect if running under Terminal Server?

K

Kevin Hodgson

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

One Handed Man \( OHM - Terry Burns \)

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
 
K

Klaus H. Probst

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top