Solved

Terminal Services

Posted on 2002-05-02
4
175 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
  • 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 50 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
This article describes how to reset your Windows 10 password when you've forgotten it.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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