Windows: How to make programs think they're not running in a terminal server session?

Posted by sinni800 on Super User See other posts from Super User or by sinni800
Published on 2011-06-24T09:41:53Z Indexed on 2011/06/29 8:25 UTC
Read the original article Hit count: 290

I am using the program "SoftXPand 2011 Duo" by Miniframe on my Windows 7 PC. It makes two workstations out of one computer. It uses the terminal services built into Windows to create the additional session. I use two screens, two keyboards and two mice to create this "illusion" of two computers. It works quite well and I can even play two different 3D games on the two screens attached to this single machine (using a Radeon HD5770 and a Core i5 2500k with 8 Gbytes RAM).

There are a few downsides to this. I just found about one that is hidden on the first look. The sessions you are in (even on the first workstation) will identify as a terminal server session! Now some programs will run with limited effects (graphical), and some won't run at all.

This also resulted in some games not running at all. They just say "Cannot be run in a terminal server session" and exit. I have already proven that top modern games (DirectX 10, 11) run just as good as on the same machine without SoftXPand, so this is a pretty artificial limitation!

So, can I somehow hack my current session so it doesn't look like a terminal server session anymore? I. E.

#include <windows.h>
#pragma comment(lib, "user32.lib")

BOOL IsRemoteSession(void)
{
   return GetSystemMetrics( SM_REMOTESESSION );
}

Will return FALSE? (Not a programming question! Just an example how programs detect if they're in a terminal server session!)

© Super User or respective owner

Related posts about windows-7

Related posts about Windows