Hi,

I'm trying to write a c# program which checks which user is logged on to a remote machine.
I have the machine name, the user name and - last but not least - administrative permission.

The only thing I've managed to find on the web is

if (Environment.UserName == "GeorgeWashington") isLoggedon = true;

...which doesn't seem to be what I'm looking for.

Help would be, quite naturally, greatly appreciated.

Your best bet may be using WMI. I've used it a bunch in VBScript, and it's quite powerful. There's guaranteed to be a boat load of resources out there for the combination of WMI and C#.