Take a look at this gem
http://thethin.net/clientinfo.zip

I haven't tested it but it looks like it might fit the need.

There's also a WTSManager.DLL floating about that can be accessed via COM. GOOGLE found it but the site was down when I checked.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.