积极答复者
请教如何得到xp系统用户的个数和如何读取组策略的设置

问题
-
因为这两个问题都是为了解决一个问题,就放到一起了。先简单说一下我遇到的问题, 当xp系统在使用Wecome Sceen的登录方式前提下,如果只有一个用户,并且用户的密码为空,则系统默认自动登录。而当系统使用Gina的方式登录时,需要满足设置了自动登录条件(control userpasswords2),并且组策略中没有设置需要按ctrl+alt+del键登录。
如果要判断当前系统是否是自动登录,需要判断出当前系统的激活用户个数和组策略中对是否需要CTRL+ALT+DEL的设置。可是不知道有什么办法在程序中来得到这2个信息。查了半天,只找的可以用GPMC接口来操作组策略,但GPMC还需要单独安装。不知各位高人有什么简单的方法吗?多谢!
答案
-
用记事本打开组策略模板。
Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
Visual C++ MVP- 已标记为答案 stardotdot 2009年6月25日 1:34
全部回复
-
找到一个可以判断当前激活用户的方法--NetUserEnum
但是,读取组策略Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options还是没有找到方法- 已编辑 stardotdot 2009年6月24日 9:48 改错字
-
用记事本打开组策略模板。
Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
Visual C++ MVP- 已标记为答案 stardotdot 2009年6月25日 1:34