What is the best way to enumerate all of the user profiles on a computer?
I know how to get the currently logged in user profile, and I know how to get the \"all use
You could read in the contents of the directory one level above %ALLUSERSPROFILE%.
Then you would have the names of all accounts that are (or were, if not deleted completely) on the system. To verify that an account still exists, I would use LsaLookupNames2. This function retrieves the SIDs that belong to account-names (deleted account == no SID).