954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help: checking local user on remote machine

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.

Jinspire
Newbie Poster
7 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

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#.

Sodabread
Posting Whiz in Training
290 posts since Nov 2009
Reputation Points: 103
Solved Threads: 42
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: