terminalservices

How do I stop Windows applications from stealing focus

I know this isn't strictly a programming question but y'all must have experienced this. So...you have four or five RDP sessions open over the corp VPN, you're bashing away inside your favourite IDE, your VPN to the data centre bounces briefly then recovers, all your RDP sessions start re-establishing their connections and whilst doing ...

Monitoring CPU Core Usage on Terminal Servers

I have windows 2003 terminal servers, multi-core. I'm looking for a way to monitor individual CPU core usage on these servers. It is possible for an end-user to have a run-away process (e.g. Internet Explorer or Outlook). The core for that process may spike to near 100% leaving the other cores 'normal'. Thus, the overall CPU usage o...

Determine if a program is running on a Remote Desktop

Is there a way my program can determine when it's running on a Remote Desktop (Terminal Services)? I'd like to enable an "inactivity timeout" on the program when it's running on a Remote Desktop session. Since users are notorious for leaving Remote Desktop sessions open, I want my program to terminate after a specified period of inacti...

Skype & Terminal Services information exchange?

We have sales reps who access our 'system' via terminal services. In our system we would like to enable clicking the number of a client and launching skype on their local machine not in the terminal services session. We see two potential ways of this working... Clicking on a URL ( eg skype:01234569?call ) and it works locally but we ...

How can you get the terminal service client machine name from javascript?

Is it possible to get the machine name, or IP, or MAC address (basically client network information) from javascript running Internet Explorer? I found the following code that seems to accomplish this: function Button1_onclick() { var locator = new ActiveXObject("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."...

Terminal Services: Get Client Name While Running As Administrator

Under normal circumstances, a VB.NET application of mine can check the ClientName environmental variable to get the name of the workstation the user is connecting from. So when WorkstationX RDPs into ServerA: ComputerName=ServerA ClientName=WorkstationX That works fine. If I right-click on the application and choose Run As Administ...

Unpacking _WTS_CLIENT_ADDRESS.Address in vb.net (retreiving IP address from Terminal Services Client)

I have the following structure: <StructLayout(LayoutKind.Sequential)> _ Public Structure _WTS_CLIENT_ADDRESS Public AddressFamily As Integer <MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> _ Public Address() As Byte End Structure Which is populated by the following call: Dim _ClientIPA...

How to use terminal services programmatically

I want to access remote server using my program (C# .NET) and execute there a program in the context of connected user, just like using Remote Desktop. I don't want just run a program using some user account(like RunAs), but to have a separate execution session like Remote Desktop I guess terminal services should be used somehow, but I...

What would cause my application to lose access to the resource (.resx) file

Winforms c# application running on terminal server. All images for buttons and menu items are stored as resources in the .resx file. After some heavy use, opening and closing windows while using the system, an "index out of range" exception is thrown and the window no longer opens. If the user attempts to navigate to any other part of...

Single Remote Desktop session in Server 2003

I have a headless server running Windows Server 2003, and administer it via VNC. It is set to auto login to a specific user account. I want to change to using Remote Desktop/Terminal Services. However, when I log in remotely a new user session is created (in addition to auto logged in session). Essentially I want a remote desktop connec...

How to read TermainsServices IADsTSUserEx Property from LDAP in C#?

I have read the following properties from AD, TerminalServicesProfilePath TerminalServicesHomeDirectory TerminalServicesHomeDrive I've tried DirectoryEntry and DirectorySearcher. But they does not include the properties. I found some example in vbscript and VC to read them. However I failed to make it working in C#. Am I missing some...

How can I query teminal services activity remotely?

I want to query our servers to see look for disconnected/idle sessions. I know I can use 'query.exe', but I'd prefer something that's easier to work with from code. WMI would be my preference. Thanks. ...

wtsapi32.WTSQuerySessionInformation() Failing on x64

Hi All, I'm trying gather Terminal Server session information on 64-bit Windows machines. My question is two fold. First, on 32-bit machines we called the following function, which worked fine. Private Declare Function WTSQuerySessionInformation Lib "wtsapi32" _ Alias "WTSQuerySessionInformationA" _ ...

What is X Server and Remote Terminal Server?

Can someone explain what is the difference between X server and Remote Terminal servers in simple terms? For example, Hummingbird Exceed is an X server and Citrix is a Remote Terminal Server. How do these servers work? ...

Enumerate printers for a specific Terminal Server session

I am looking for a way to see what printers a specific user has mapped into his or her TS session. How can I achieve this with WMI (via PowerShell) or VB-Script? Is there a built-in way I'm not aware of? EDIT: In our construct mapping of local printers by the RDP-Client is disabled. Users get their printers created during login via VBS...

TerminalServer Property in MSI Installers

Hi Folks, we are trying to create an MSI Installer for an app which under Windows Server 2003. The app needs users to be able to log on via Remote Desktop. Using the "TerminalServer" property looked like the correct test to ensure that's the case, but this returns "false" on machines which do have the right OS with Terminal Service runn...

Terminal Services Servers Information

I was wondering if anyone had some good general information on windows terminal services and how it works. I'm wondering: If a DLL is loaded into memory is it available for all users or reloaded for each user. (or does it depend on something else) A specification for an example server and how many concurrent users it supports with gene...

Which Interprocess Communication methods work on a Terminal Server?

In a terminal server session, some standard IPC technologies might not work like in a single user environment, because the required resources are not virtualized. For example, TCP/IP ports are not virtualized, so applications in different sessions which try to listen on the same port will cause a port conflict. Which IPC technology wil...

RDP ActiveX Ctrl+Alt+Del

In our C# application we use the RDP viewer as an ActiveX control. The application has its own toolbar with a Ctrl+Alt+Del button. There does not seem to be a method on the ActiveX control to perform this function. I know you can hit Ctrl+Alt+End on your keyboard which is fine but how do I do that from the toolbar button click? ...

How do I detect whether I'm installing on a Terminal Server in an InnoSetup script?

My setup should behave slightly differently when the program is installed on a Terminal Server. I know about GetSystemMetrics(SM_REMOTESESSION) but as far as I understood that will only tell me whether I'm running inside a RDP session. It would not catch the case where the server admin is logged on locally to install software, or would i...