Get List of User Profiles
Posted on 2006-07-14
I need a way in VB.NET to get a list of users who have profiles on the machine. I'd rather not do this by just going to the Documents and Settings folder and enumerating folder names, and it needs to be their user names, and not just folder names (since TestUser.046's user name isn't TestUser.046 ;)). I'd like code tha will work on at least Windows 2000 and Windows XP, and I'd be extra happy if it was NT compatible. It should also run for Power User. I have control over the machines, so if this means changing the security on a few keys, that's OK.
Bonus points if I can get the domain they logged in with.