?
Solved

Terminal Services

Posted on 2002-05-02
4
Medium Priority
?
178 Views
Last Modified: 2010-04-13
How can I detect from within my program (VB) if it runs in Terminal Server session or directly in win2k?
Thank you.
0
Comment
Question by:zachar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6986149
are you asking whether or not your system is a Terminal Services client?

if so, easiest way to check is visually.  if your PC is a thin client machine (very, very small CPU box), then you are most probably running as a TS client, as you don't have a harddrive.

if you have a standard PC, but need to log into a TS session before you can run your app, then you are also a TS client & the app is on the server.

if you have a standard PC & are running the app right from your desktop, you are not operating in a TS session.


hope this helps!

/ew
0
 
LVL 1

Author Comment

by:zachar
ID: 6986194
I have to check if my system is Terminal client, but to do it automatically, form code - not visually. Probably this parameter stored anywhere in the registry or system variable - I just want to know where exactly.

 b.t.w - if you want to use "visual" way, just press start button - at the left side you will see "Windows 2000 Terminal" and not "Windows 2000 Server"
0
 
LVL 1

Accepted Solution

by:
igore earned 200 total points
ID: 7004252
Check the environment variable SESSIONNAME.  If you are in a Terminal Session it will return the session ID, if you are logged on to the console it will return 'Console'.  If you are logged on to a workstation (Other than Windows XP) it will be empty.
0
 
LVL 1

Author Comment

by:zachar
ID: 7004255
Thanks a lot!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
What's worse than having your data encrypted by ransomware? Getting attacked by a so-called "wiper," which simply destroys the data and offers you no hope of ever seeing it again.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question