问题描述
枚举计算机上所有用户配置文件的最佳方法是什么?
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 user" profile. But I'd like to get a list of each and every profile on the computer.
推荐答案
在像 flokra 建议的那样走无证路线之前,我会尝试 NetUserEnum() 或 NetQueryDisplayInformation()
Before going the undocumented route like flokra suggests, I would try NetUserEnum() or NetQueryDisplayInformation()
如果你想进入无证领域,HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList 有一个(不完整的)账户列表(缺少像 ASPNET、HelpAssistant 和 SUPPORT_xxxx 这样的特殊账户) 它还具有配置文件文件夹的路径,这比使用 %ALLUSERSPROFILE%.. 安全得多,但为什么在有 GetProfilesDirectory()
If you want to go into undocumented land, HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList has a (incomplete) list of accounts (It's missing special accounts like ASPNET, HelpAssistant and SUPPORT_xxxx) It also has the path to the profile folder, which is a lot safer than using %ALLUSERSPROFILE%.. but why use it when there is GetProfilesDirectory()
这篇关于在 C++ Win32 中获取计算机上的用户配置文件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)