Getting all the HUMAN users on an XP/2K/NT machine

From: Nollie (AlabamaWins_at_Auburn.com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 14:15:36 -0600

I use NetUserEnum with the USER_INFO_2 struct to enumerate all of the
users on any given NT/2k/XP machine, but I get a bunch of "hidden"
accounts. On an XP machine I can go to the
"HKLM\Software\Microsoft\Windows\CurrentVersion\WinLogon\SpecialAccounts\UserList"
registry key and get a list of the accounts that aren't real people.
But on Windows 2000 there doesn't seem to be a way to descriminate
between computer accounts and human accounts.

Should I use another struct besides the USER_INFO_2 struct to
retrieve this data, or am I overlooking the the data in the
LPUSER_INFO_2 struct? Or is there another way?