Get logged on users

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need, for an application, to know if a specific XP (or NT) local user is currently logged on or not
How can I do it in C#
Thanks
 
You can get hold of the Name and UserDomainName from the System.Environment class

HT

RS
 
You may also want to check out WindowsIdentity if you are going to work with logged on users and accounts

HT

RS
 
Thanks, but could you be more specific
In Environment and WindowsIdentity class I didn't find nothing really useful for my purpose, but probably I don't know where exactly I need to search
I found how I can get the current user, or the user running a process, but not if an user is logged
An example: I know that in my PC exists the user "John", how can I know if is logged on? Doesn't exist a simple function to get it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top