(Updated 2009-12-28) Multiple sessions over remote desktop on Windows 7, Windows Vista and Windows XP
Computers - Miscellaneous
Written by Wojciech Kocjan   
One of the major drawbacks of Windows Vista compared to Windows 2008 Server is the limitation of Remote Desktop (Terminal Service) functionality. On Windows 2003 and Windows 2008 server systems it is possible to log in as one user locally and log in as several other users remotely. Until recently I thought that these are features done only on server editions of Windows and that for XP and Vista it's not possible to set it up this way. Well, I was wrong! It is possible.

The background:
For several months now, I've been using Windows 2008 on my desktop computer. It has almost all the features of Windows Vista, but allowed me to explicitly choose which ones I like. Another huge benefit was that I could log in as one user locally and log in as another one remotely - for example give a user to my family and log in remotely when not at home, without having to log off person physically by the computer. Usually I just need to check a few things, but without kicking anyone out

However, I encountered several issues with drivers - upgrading ATI drivers is a mess, Bluetooth drivers only work partially and some other minor annoyances. Recently, I decided to switch to Vista. I noticed the remote desktop limitation very quickly - and it annoyed me to such a degree that I spent a few days investigating it. I decided to also try working out these issues on my other Windows XP box, just to see if it can also be improved. Here is a short summary of what I dug up on the Internet, compressed to a single post covering both Vista (pre-SP1 and SP1) and XP (tested on an SP3 box).

I think that the only reason Microsoft does not allow multiple remote sessions to a workstation edition of their system is their business model. Microsoft wants companies to buy server editions to allow people to use them for using applications remotely. And I think it's only fair. The only thing that they haven't thought of is that it's common for people to log in as user A locally and B remotely - limiting this way of operating seems a bit weird, but luckily, some people have worked around it.

Warning:
Even though I have personally patched my system for test reasons, I make no guarantees about what these changes can cause to your system. DO IT AT YOUR OWN RISK!

Windows 7 and Windows Vista - universal termsrv patch
In order to patch Windows 7 and Windows Vista it is best to use universal termsrv patch from deepxw. This patch applies to Vista SP1/SP2, XP SP2/SP3 and Windows 7. I have tested it on Windows Vista XP2, Windows XP SP2 and Windows 7. First download the patch from link below and extract 32bit (UniversalTermsrvPatch-x86.exe) or 64bit (UniversalTermsrvPatch-x64.exe) binary to your hard disk.
http://deepxw.blogspot.com/2009/01/download-latest-version.html

Next, boot your computer into safe mode and run the appropriate binary. It will patch the termsrv library and ask if you want to reboot. Either reboot by answering Yes to the question or reboot manually. That's it.

Windows XP SP3
Enabling multiple remote desktop sessions on XP with Service Pack 3 has also been made quite easy by several folks. File with all the changes is located here:
http://www.isralet.com/files/termsrv_sp3_patch.rar

Next, boot your computer into safe mode (replacing the files failed for me without it) and copy appropriate dll file as C:\WINDOWS\System32\termsrv.dll (or equivalent if your Windows directory is different). After that, delete or rename C:\Windows\system32\dllcache\termsrv.dll library so that XP will pick up the new one. Finally run the attached ts_concurrent_session_patch.reg file which will alter settings of your system to allow multiple remote connections. Next, reboot again in normal mode and things should work fine.

Windows XP SP2
Enabling multiple remote desktop sessions on XP with Service Pack 2 is different than SP3. If you can upgrade, I recommend using the method mentioned earlier in the page. If you need to use SP2, download the following termsrv.dll library:
http://members.lycos.nl/nessyh/files/termsrv.dll

Next, boot your computer into safe mode (replacing the files failed for me without it) and copy appropriate dll file as C:\WINDOWS\System32\termsrv.dll (or equivalent if your Windows directory is different). After that, delete or rename C:\Windows\system32\dllcache\termsrv.dll library so that XP will pick up the new one.

Now, run the registry editor (Start -> Run and type regedit). Next, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core. Create a new DWORD key EnableConcurrentSessions and set it to 1. Close the registry editor.

Now start Group Policy Editor (Start -> Run and type gpedit.msc). Go to Computer Configuration, Administrative Templates, Windows Components and Terminal Services. Next open Limit number of connections option, select the Enabled option and enter the number of connections you want to enable - at least 2, value of 5 seems a reasonable limit.

Next, reboot again in normal mode and things should work fine.

Verifying that it worked
One thing I really think is useful and I haven't found on any other sites is how to verify that patching has actually worked. Below is how I tested the solution to make sure it works - it requires another computer, but I assume you have it since you plan on connecting to your computer in the first place:
  1. on your main computer, create user A and user B, providing them with passwords
  2. either add both users to Administrators group or add them to list of users that can use remote desktop
  3. from your secondary computer, open 2 remote desktop sessions and connect as both user A and B
  4. verify that no user has been disconnected and that both remote sessions work properly
  5. disconnect both users from remote sessions and delete those users
  6. (optional) make sure those users' home directories (usually under C:\Documents and Settings) have been deleted; if you have any problems with that, reboot and remove these directories (this usually happens for anti-virus software)
The reason I'm testing 2 different remote connections is that on Vista (I think it's not true for XP, but I'm not sure), if the local user has locked the workstation, a remote user can log in without this patch. Logging in as 2 distinct users is the best way to test this and be 100% sure that it works fine.

Again, none of this has been done by me. I have only done an effort of combining all of the pages below in one place. Links and sources I based on:


Update:
Recently I've stumbled upon a page that has an universal patch for termsrv that does work for Vista SP2 and claims to also work for previous Vista releases, Windows 7 and Windows XP. I've verified other systems to work with patches therefore I decided to add the universal tool as well as keep other methods for Vista pre-SP2 and XP systems.