How to get all user account info in C# (windows VISTA/7)??
Hey guys,
is there a way to get the information (username, home directory, user group, ...) from every user account on a windows machine (VISTA / 7). I'm running the program as an Administrator so rights shouldn't be a problem.
Ofcourse the passwords aren't needed.
Thanks in advance!!!
PS: I'm not that great of a programmer , so some example code would be sweet!
Re: How to get all user account info in C# (windows VISTA/7)??
Because I can't seem to find an edit button I'll post this in another post:
I'm using visual studio 2008 so C#.net 3.5
Re: How to get all user account info in C# (windows VISTA/7)??
Re: How to get all user account info in C# (windows VISTA/7)??
thanks but I tried this and it says I don't have the valid namespace while I'm sure I do...
Re: How to get all user account info in C# (windows VISTA/7)??
the compiler usually knows better so maybe show us your code?
Re: How to get all user account info in C# (windows VISTA/7)??
I thinks you should add using System.Management;
and add reference System.Management to your project.
Re: How to get all user account info in C# (windows VISTA/7)??
Quote:
Originally Posted by
memeloo
Thank you, this was amazing help and it worked.
I only now need to find how I can get a user's group, because that doesn't seem to be an option like "name" or "fullname" with WMI.